Angularjs continue.

Source: Internet
Author: User

<HTMLNg-app>//Global references corresponding to Phonelistctrl templates <Head>    <Scriptsrc= "Js/angular.js"></Script>    <Scriptsrc= "Js/test.js"></Script></Head><BodyNg-controller= "Phonelistctrl">    <ul>        <Ling-repeat= "Pho in Phones">{{Pho.name}}<P>{{Pho.snippet}}</P>        </Li>    </ul>
Scope of the div inside the MyApp<DivNg-app= "MyApp"Ng-controller= "MyTest"> <ul> <Ling-repeat= "ph in Phone">{{Ph.name}}<P>{{Ph.snippet}}</P> </Li> </ul> </Div> </Body></HTML>

JS Code

functionPhonelistctrl ($scope) {$scope. Phones= [      {          "Name": "Nexus S",          "Snippet": "Fast just got faster with Nexus S."      },      {          "Name": "Motorola xoom™with Wi-Fi",          "Snippet": "The next, next Generation tablet."      },      {          "Name": "MOTOROLA xoom™",          "Snippet": "The next, next Generation tablet."      }    ];} Self-Declaration template common external usevarApp = Angular.module (' MyApp '), []); App.controller (' MyTest ',function($scope) {$scope. Phone= [       {           "Name": "Nexus S",           "Snippet": "Fast just got faster with Nexus S."       },       {           "Name": "Motorola xoom™with Wi-Fi",           "Snippet": "The next, next Generation tablet."       },       {           "Name": "MOTOROLA xoom™",           "Snippet": "The next, next Generation tablet."       }    ];});

Http://www.widuu.com/archives/04/1035.html

http://www.ituring.com.cn/article/15762

Not yet Epiphany

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.