ng-options= "Item.action for item in Todos"
Basic forms of ng-options expressions, such as "< tags > for < items > in < arrays >
<option value= "" > (Chosse one) </option>
Ng-options= "Item.id as item.action for item in Todos"
Forms in the form of < selected properties >as < tags > for < variables > in < arrays >
ng-options= "Item.action group by Item.place for item in Todos"
Group objects
Using a non-scoped controller
1 <!DOCTYPE HTML>2 <HTMLLang= "en"Ng-app= "IAPP">3 <Head>4 <MetaCharSet= "UTF-8">5 <title>Document</title>6 <Linkrel= "stylesheet"href= "Bower_components/bootstrap/dist/css/bootstrap.css">7 <Linkrel= "stylesheet"href= "Bower_components/bootstrap/dist/css/bootstrap-theme.css">8 <Scriptsrc= "Bower_components/angular/angular.js"></Script>9 <Script>Ten Angular.module ('iApp',[]) One . Controller ('Topctrl',function(){ A This. DataValue='Hello,adam'; - This. Reversetext=function(){ - This. DataValue= This. Datavalue.split (""). Reverse (). Join (""); the } - }) - </Script> - </Head> + <Body> - <Divclass= "Well"Ng-controller= "Topctrl as CTRL"> + <h4>Top level Controller</h4> A <Divclass= "Input-group"> at <spanclass= "Input-group-btn"> - <Buttonclass= "Btn Btn-default"Ng-click= "Ctrl.reversetext ()">Reverse</Button> - </span> - <inputtype= "text"class= "Form-control"Ng-model= "Ctrl.datavalue"> - </Div> - </Div> in </Body> - </HTML>
When you apply a non-domain controller, the expression is formatted taxiing such as:< to apply the controller > as < variable name >
Then use the CTRL variable in the view to access the data and behavior, similar to this: <input.....ng-model= "ctrl.datavalue" >
Angularjs A Little learning note