Angularjs form tutorial

Form: Form act as a container for HTML elements. Angularjs form: AngularJS is very rich in form filling and validations. For example we can use ng-click to handle AngularJS click on button and use $dirty and $invalid flags to do the validations. Angularjs contains the form controls like input, select, button etc. These form elements … Read more

Angularjs events tutorial

Event: Happening something is known as event. Angularjs events: Angularjs provides no. of events directives to handle DOM events like mouse clicks, moves, keyboard presses, change events etc. We can add AngularJS event listeners to our HTML elements by using one or more of following directives: ng-blur ng-change ng-click ng-copy ng-cut ng-dblclick ng-focus ng-keydown ng-keypress … Read more

Angularjs add directive to module tutorial

AngularJS directive: AngularJS directives are used to extend the functionality of HTML elements. AngularJS are the special attributes starting with ng- prefix. AngularJS module: An AngularJS module defines an application and used to separate logics like services, controllers and application etc. It acts as a container for the different parts of an application. Example Explanation: … Read more

Angularjs add controller to module 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 module: An AngularJS module defines an application and used to separate logics like services, controllers and application etc. It acts as a container for the different parts of an … Read more

Angularjs modules tutorial

AngularJS module: An AngularJS module defines an application and used to separate logics like services, controllers and application etc. It acts as a container for the different parts of an application. Note: To keep the code clean keep the modules in separate js files. Angularjs creating modules: We can create an angularjs module by using … Read more

Angularjs HTML DOM tutorial

AngularJS DOM: AngularJS provides the inbuilt directives for binding application data to the attributes of HTML DOM elements. Name Description ng-disabled It is used to disable a given control. ng-show It is used to show a given control. ng-hide It is used to hide a given control. ng-click It represents an AngularJS click event. Example … Read more

Angularjs get table row index example

Angularjs get table row index: The index object is used to get table row index. Initial value of index is 0. Syntax: {{$index}}{{$index}} Example explanation: The ng-app directive initializes the application. We create a students object which is initialized by ng-init directive using JSON syntax. The ng-repeat directive will work as for-each loop and iterates … Read more

Angularjs table sorting example

Angularjs table sorting: An orderBy filter is used to sort an Angularjs table. An orderBy is an angularjs filter which is used to orders or sort an array by an expression. Syntax: {{ expression | orderBy }}{{ expression | orderBy }} Example explanation: The ng-app directive initializes the application. We create a students object which … Read more

Angularjs table tutorial

AngularJS table: Orderly arrangement of quantitative data in columns and rows is known as table. In AngularJS ng-repeat directive is used for displaying tables. Let us have a brief look at ng-repeat directive. ng-repeat directive: The ng-repeat directive is used to repeats html elements for each item in a collection. Example: <div ng-app = ""> … Read more

Angularjs rootscope tutorial

Angularjs rootscope: The rootScope is the parent scope object for an AngularJS application and it will be single for an application. The data and methods of $rootScope object will be available to all the controllers. All scope objects are child objects. Example Explanation: First include the AngularJS library in the application. The ng-app directive initializes … Read more