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

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

git checkout -f step-0

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

如今就能够本身建立HTML,编写angular了git

app/index.htmlbootstrap

<!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 说明该项目的做用域 这里是 整个htmlapp

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

加载angularspa

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

相关文章
相关标签/搜索