What is Dependency Injection and how to use Dependency Injection in Controller of AngularJs in ASP.Net

Last Reply on Jun 12, 2017 03:00 AM By dharmendr

Posted on Jun 12, 2017 02:20 AM

hello sir 

i am new in angular js and want to know about dependency injection

any one tell me the esay way what is dependency and why it is so usefull 

like below example we create scop and http as a injector i think

 countryApp.controller('CountryCtrl', ['$scope', '$http', function (scope, http){
        http.get('countries.json').success(function(data) {
          scope.countries = data;


You are viewing reply posted by: dharmendr on Jun 12, 2017 03:00 AM.
Posted on Jun 12, 2017 03:00 AM