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

相關文章
相關標籤/搜索