Data binding with AngularJS Directives

June 28, 2018

The {{expression}} in AngularJS binds AngularJS expressions with AngularJS data. {{ Name}} is bound with ng-model=”Name”. <div ng-app=”” ng-init=”table=2;number=5″> Table: <input type=”number” ng-model=”table”> Number: <input type=”number” ng-model=”number”> Sum Of Number: {{ table * number}} </div> Above example two text fields are bound…

AngularJS Directives

June 28, 2018

AngularJS directives with ng prefix such as- ng-app, ng-init, ng-model and these directives extends the HTML attributes. The ng-app directive initializes an AngularJS application. The ng-init directive initializes application data. The ng-model directive binds the value of HTML controls to application data…

Creating a module in AngularJS

June 28, 2018

Simple you can create module by using the AngularJS function angular.module. <div ng-app=”myPro”>…</div> <script> var app = angular.module(“myPro”, []); </script> Application will run by using “myPro” parameter. Now you can add controllers, directives, filters, and more, to your AngularJS application. HTML: <div ng-app=”myPro”> <div> {{…

AngularJs expressions

April 25, 2018

Simple we can say that angularJs binds the data to html using expressions this is called angularJs expressions. AngularJs expression is written inside double braces such as {{your expresion}} also you can write expression inside a directive such as ng-bind=”expression”. AngularJs expression…