Schogini is Magento2 ready. Are you?

Get started with Magento 2 | Need expert Magento2 support?

Know the Basic AngularJS Directives: ng-app, ng-model & ng-bind


Date: 2015-11-03 | Category: AngularJS

Basic AngularJS directives are

ng-app directive

ng-app defines an AngularJS application. It tells AngularJS that the a particular html element is the "holder" of an AngularJS application.

ng-model directive

ng-model directive binds the value of HTML controls ( like input, textarea etc.) to application data.

ng-bind directive

ng-bind directive binds application data to the HTML view.

See the Example & Try it yourself

<!DOCTYPE html>
<html>
<script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<body>

<!-- Using ng-app directive -->
<div ng-app="">

<p>Input Anything!:</p>
<!-- Using ng-model directive -->
<p>Type: <input type="text" ng-model="contents"></p>

<!-- Using ng-bind directive -->
<p ng-bind="contents"></p>

</div>

</body>
</html> 

Schogini's customer service extends beyond the natural boundaries. ~ Timothy Johnson

Schogini assures 24x7 - 6 hour turn around ticket response time and 24 hour Email response time (support@schogini.com)