I haven’t written anything for a long time. I feel like I don’t even know where to start. Let’s write something technical first, angularjs – my brother calls it “忺哥拉js”
1. Download
Official website: <a href="https://angularjs.org/">https://angularjs.org/<code>官方网址:<a href="https://angularjs.org/">https://angularjs.org/</a>
CDN: <a href="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.5/angular.min.js">https://ajax.googleapis.com /ajax/libs/angularjs/1.3.0-beta.5/angular.min.js<code>CDN:<a href="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.5/angular.min.js">https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.5/angular.min.js</a>
2. Brief introduction to use 1.ng-app
determines the scope of angularjs, you can use it as follows
to let angularjs render the entire page, you can also use
<code><br>
<font face="Arial"><div ng-app='myapp'><br>
……<br>
</div></font><br>
…
to render part of it.
2.ng-model
3.angular.module
4.controller
6.provider
provider也是angular.Module中的方法provider(name, providerType);其中name是service的名称,providerFunction是函数用于创建新的服务器对象,这个跟factory差不多,我们现在用provider重写
7.service
service也是angular.Module中的方法service(name, constructor);其中name是service的名称,constructor一个将被实例化的构造函数,这个跟factory差不多,我们现在用service重写
8.constant
constant也是angular.Module中的方法constant(name, object);其中name是常量的名称,而object是常量的值,我们可以这样写的
今天就写到这里,然后以后继续.