Angularjs scope inheritance tutorial

AngularJS scope inheritance: In case of multiple controllers AngularJS framework creates and pass a different $scope object to each controller so that data and methods of one controller not be accessed in another controller. AngularJS also provides the inheritance feature for nested controllers. For nested controllers child controllers can inherit and override the parent’s controller … Read more

Angularjs scope multiple tutorial

Angularjs multiple scope: In case of multiple controllers AngularJS framework creates and pass a different $scope object to each controller so that data and methods of one controller not be accessed in another controller. Example Explanation: First include the AngularJS library in the application. The ng-app directive initializes the application. The ng-model directive binds (two … Read more

Angularjs scope tutorial

AngularJS Scope: AngularJS Scope is a special JavaScript object which transfers data from the controller to view and vice-versa. AngularJS Scope is represented by $scope which contains application data and methods. We can define properties and functions in $scope object inside controller. AngularJS Scope:   Example Explanation: First include the AngularJS library in the application. … Read more

angularjs filter tutorial

AngularJS filters: AngularJS filters are used to format the data. AngularJS filters can be added to expressions and directives using pipe character |. Syntax: {{ expression | filter }}{{ expression | filter }} In case of multiple filters: {{ expression | filter1 | filter2 }}{{ expression | filter1 | filter2 }} Commonly used AngularJS filters: … Read more

Angularjs MVC tutorial

AngularJS MVC: AngularJS mvc framework provides the facility to build flexible and loosely coupled applications. MVC stands for Model-View-Controller design pattern which separates the business logic, presentation logic and navigation logic. Where: Model: is responsible for encapsulating the application data. View: is responsible for rendering the model data. Controller: is responsible for receiving the user … Read more

AngularJs controller tutorial

AngularJs controller: AngularJS controllers are used to control the data and flow of AngularJS applications. The ng-controller directive is used to define the AngularJS controller. AngularJS controllers are JavaScript Objects containing attributes or properties and functions. Each AngularJS controller accepts $scope as a parameter which refers to the application or module which is to be … Read more

Angularjs two way data binding tutorial

As we discussed in earlier tutorials that ng-model directive is used to define the model or variable for a HTML element to be used in AngularJS i.e. it binds the state of HTML element with model value. If the value HTML element changes, AngularJS automatically change the model value and vice-versa. Angularjs two way data … Read more

Angularjs expression tutorial

AngularJS Expressions: AngularJS expressions binds application data to HTML. AngularJS expressions can be written either inside double braces {{ expression }} or inside a directive ng-bind=”expression”. AngularJS expressions are like javascript expressions and outputs the result where they are used. Example Explanation: First include the AngularJS library in the application. The ng-app directive initializes the … Read more

Angularjs hello world tutorial

First include the AngularJS library in the application. The ng-app directive initializes the application. The ng-model directive binds the state of the input text to the name variable. When we enter a value in name input box, the corresponding value will automatically updated in next line. Example: <html> <script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"> </script> <body> <div ng-app=""> … Read more

Angularjs directives tutorial

Angularjs directives: AngularJS directives are used to extend the functionality of HTML elements. AngularJS are the special attributes starting with ng- prefix. Syntax: ng-xxxx = ‘value/name’ng-xxxx = ‘value/name’ Note: Some scenarios not need ‘value/name’, for these scenarios directive can be used as ‘ng-xxxx‘ or ng-xxxx=””. Commonly used AngularJS directives: ng-app – The ng-app directive initializes … Read more