ng-model directive defines the model/variable to be used in AngularJS Application. In following example, we’ve defined a model named “name”.
…
<p> Name: <input type = “text” ng-model = “name“></p>
</div>
HTML is great for declaring static documents, but it falters when we try to use it for declaring dynamic views in web-applications. AngularJS lets you extend HTML vocabulary for your application. The resulting environment is extraordinarily expressive, readable, and quick to develop.
ng-model directive defines the model/variable to be used in AngularJS Application. In following example, we’ve defined a model named “name”.
ng-repeat directive repeats html elements for each item in a collection. In following example, we’ve iterated over array of countries.
AngularJS expressions are written inside double braces: {{ expression }}.
Expressions are used to bind application data to html. Expressions behaves in same way as ng-bind directives. AngularJS application expressions are pure javascript expressions and outputs the data where they are used. Here is the example of sum of two … Read more
AngularJS expressions are written inside double braces: {{ expression }}.
Expressions are used to bind application data to html. Expressions behaves in same way as ng-bind directives. AngularJS application expressions are pure javascript expressions and outputs the data where they are used. Here is the example of combine of two … Read more
AngularJS expressions are written inside double braces: {{ expression }}.
Expressions are used to bind application data to html. Expressions behaves in same way as ng-bind directives. AngularJS application expressions are pure javascript expressions and outputs the data where they are used. Here is the example for to get roll … Read more
AngularJS expressions are written inside double braces: {{ expression }}.
Expressions are used to bind application data to html. Expressions behaves in same way as ng-bind directives. AngularJS application expressions are pure javascript expressions and outputs the data where they are used. Here is the example for to get mark … Read more
AngularJS application mainly relies on controllers to control the flow of data in the application. An AngularJS controller is defined using ng-controller directive. A controller is a JavaScript object containing attributes/properties and functions. Each controller accepts $scope as a parameter which refers to the application/module that controller is to control.… Read more
AngularJS Filters are used to change modify the data and can be clubbed in expression or directives using pipe character.
Filters can be added to expressions and directives using a “pipe” character. Following is the list of commonly used filters.
lowercase : Format a string to lower case.
uppercase : … Read more
The ng-disabled directive binds AngularJS application data to the disabled attribute of HTML elements. AngularJS has directives for binding application data to the attributes of HTML DOM elements.
<div ng-app=”myApp”>
<p>
<input type=”checkbox” ng-model=”myStatus”>Enable/Disable Button
</p>
The ng-disabled directive binds the application … Read more
The ng-show directive shows or hides an HTML element using AngularJS.
<div ng-app=”myApp”>
<p ng-show=”true”>Visible Element</p>
<p ng-show=”false”>Hidden Element</p>
</div>
ng-show attribute to a HTML button and pass it a model. Bind the model to an checkbox and see the variation.
…