AngularJS, Front End Development

Angular 2 Dependency Injection

In this blog, we will go through the new dependency injection system of Angular 2. As we know DI is the heart of AngularJS. In Angular 1 we can inject dependency at multiple places in different ways such as: in the directive definition by name   eg. [js]app.directive('questionTemplate', ['$http', 'Flash', function($http,...

by Kavita Bora
Tag: Dependency
30-Jul-2016

AngularJS, Front End Development

Dependency Annotation in AngularJS

When a function of service or controller invoked via the injector then we have to annotate these functions so that the injector knows what service to inject into the function. In Angular, there are three ways of annotating code with service name - Inline Array Annotation $inject Property Annotation Implicit Annotation ...

by Dhanendra Kumar
Tag: Dependency
15-Jun-2015