AngularJs introduction

AngularJs introduction

by Ryan Hsu

HTML

<div ng-app>
  <div ng-controller="DemoCtrl">
    <h1>{{title}}</h1>
    <!-- 這邊放入網站內容 -->
  </div>
</div>

JavaScript

function DemoCtrl($scope) {
  $scope.title = "這是一個Demo網站";
}