码迷,mamicode.com
首页 > Web开发 > 详细

angularJs的学习笔记-01(创建项目)

时间:2015-05-20 12:54:25      阅读:142      评论:0      收藏:0      [点我收藏+]

标签:

1,进入angular-phonecat目录  执行下面命令

git checkout -f step-0

然后访问 http://localhost:8000/app/  页面出现 “Nothing here yet!” 

现在就可以自己创建HTML,编写angular了

app/index.html

<!doctype html>
<html lang="en" ng-app>
<head>
  <meta charset="utf-8">
  <title>My HTML File</title>
  <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css">
  <link rel="stylesheet" href="css/app.css">
  <script src="bower_components/angular/angular.js"></script>
</head>
<body>

  <p>Nothing here {{yet + !}}</p>

</body>
</html>

ng-app 说明该项目的作用域 这里是 整个html

<script src="bower_components/angular/angular.js"></script>

加载angular

数据绑定{{变量或者字符串}}   这里面的操作跟js对字符串的操作基本上一样

angularJs的学习笔记-01(创建项目)

标签:

原文地址:http://www.cnblogs.com/monsters/p/4516775.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!