In Angular 2 a component can share data and information with another component by passing data or events. A component can be used inside another component, thus creating a component hierarchy. The component being used inside another component is known as the child component and the enclosing component is known as the parent component. Components … Continue reading Communication Between Components Using @Input() in Angular
When you start learning the very first characteristics of AngularJS, you may come across something called Dependency Injection (DI): the premise that AngularJS injects dependencies whenever an application needs them. As a developer, our task is only to pass the dependency to the module and everything else will be taken care by AngularJS. To create … Continue reading Different ways of injecting dependency in an AngularJS Application
The provider() function allows us to create a configurable service where we can set input per application for the service created using the provider (). For example, if we need to set API key to access a service on the application level, we can set that in the module config and pass input to the … Continue reading What is a Provider () in AngularJS?
Read: 21 points cheat sheet on AngularJS controller and the $scope object What is service? It provides us method to keep data across the lifetime of the angular app It provides us method to communicate data across the controllers in a consistent way This is a singleton object and it gets instantiated only once per … Continue reading Services in AngularJS simplified with examples
In hour 1 , we learnt to get started with AngularJS. In hour 2 , we learnt about AngularJS Template. In hour 3 , we learnt about two way bindings and filter. On hour 4 , we learnt about $http service and making HTTP operations. In 5th hours of series, we will learn about $scope … Continue reading Learn AngularJS Hour 5: All about $scope object