ryananthonydrake / angularDemo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Directives

ng-app - attach the Application Module to the page <html ng-app="store">

ng-controller - attach a Controller function to the page <body ng-controller="StoreController as store">

ng-show/ng-hide - display a section based on an Express <h1 ng-show="name"> Hello, {{name}}! </h1>

ng-repeat - repeat a section for each item in an Array <li ng-repeat="product in store.products"> {{ product.name }}</li>

ng-init - allows us to evaluate an expression in the current scope

ng-class - accepts a key (name of the class to set) and a value, which is the expression to evaluate. ng-class="{ active:tab === 1}"

ng-model - binds the form element value to the property

ng-submit - allows us to call a function when the form is submitted

Expressions define a 2-way Data Binding, meaning Expressions are re-evaluated when a property changes.

About


Languages

Language:HTML 54.7%Language:JavaScript 45.3%