angular知道怎么用了, 就打算读一读源代码;

<html ng-app="phonecatApp">
<head>
<meta charset="utf-8" />
<script src="http://cdn.bootcss.com/jquery/2.1.1-rc2/jquery.min.js"></script>
    <!--这个angular就是下面我贴出来的JS代码-->
<script type="text/javascript" src="angular_devolop.js"></script>
</head>
<body ng-controller="PhoneListCtrl" id="p"> <ul>
<li ng-repeat="phone in phones" t={{txt}}>
{{phone.name}}
<p>{{phone.snippet}}</p>
</li>
</ul> </body>
<script>
//初始化用户模块;
var phonecatApp = angular.module('phonecatApp', []); //为用户的控制器添加反射, 就是回调了, 文档加载完毕就会用到了;
phonecatApp.controller('PhoneListCtrl', function($scope) {
$scope.txt = "text";
$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.'}
];
}); </script>
</html>

  JS代码:

  http://files.cnblogs.com/diligenceday/angular_devolop.js

最新文章

  1. [JAVA] 注解学习@interface
  2. UnicodeEncodeError: &#39;ascii&#39; codec can&#39;t encode characters in position问题的解决办法
  3. Qt5.3编译错误——call of overloaded ‘max(int int)’is ambiguous
  4. 实现台式机redhat6.4无线网卡上网RTL8188CUS
  5. 【final】站立会议---11.27
  6. 读取XML文件的节点内的内容
  7. No connection string named &#39;***&#39; could be found in the application config file
  8. AndroidAsync :异步Socket,http(client+server),websocket和socket.io的Android类库
  9. php 命名空间(要求php5.3以上)
  10. Create XHR
  11. jQuery 遍历函数(八)
  12. 状态压缩动态规划 状压DP
  13. noj 算法 八数码问题
  14. Ubuntu 14.04 安装caffe
  15. Android开发专业名词及工具概述
  16. IIS 禁止回收
  17. day8:vcp考试
  18. ASP.NET Identity 修改表名和主键类型
  19. Windows Azure 系列-- Azure Queue的操作
  20. Ubuntu + apache + Mysql +php

热门文章

  1. IL查看override
  2. Android优化—— 内存分析工具 MAT 的使用
  3. variable &#39;xxx&#39; unsafe in &#39;case&#39;的处理
  4. C语言 三级指针的应用
  5. C语言 二级指针内存模型③
  6. [转]在 Eclipse 中嵌入 NASA World Wind Java SDK
  7. ROWNUMBER() OVER( PARTITION BY COL1 ORDER BY COL2)用法
  8. mysql5.7.12直接解压zip包,安装过程
  9. Ubuntu 14.04 下安装google的浏览器——Chrome
  10. 第一个WP8程序,照相机