ng-controller 会指定控制器使用该View,helloTo.title会告诉AngularJS 将Model中的值写入HTML中。
执行
保存myfirstexample.html 文件,并运行,可以得到以下结果:
Welcome AngularJS to the world of Tutorialspoint!
AngularJS 脚本文件也会被加载,创建全局对象。其次JS注册的Controller 会被执行。
2. AngularJS 扫描HTML查找AngularJS aPP及Views。