AngularJS: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
* https://angularjs.org/ | * https://angularjs.org/ | ||
* http://www.w3schools.com/angular/ | * http://www.w3schools.com/angular/ | ||
== Example == | |||
<source lang="html"> | |||
<!DOCTYPE html> | |||
<html ng-app="exampleApp" > | |||
<head> | |||
<title>AngularJS Demo</title> | |||
<link href="bootstrap.css" rel="stylesheet" /> | |||
<link href="bootstrap-theme.css" rel="stylesheet" /> | |||
<script src="angular.js"></script> | |||
<script> | |||
var myApp = angular.module("exampleApp", []); | |||
myApp.controller("dayCtrl", function ($scope) { | |||
// controller statements will go here | |||
}); | |||
</script> | |||
</head> | |||
<body> | |||
<div class="panel" ng-controller="dayCtrl"> | |||
<div class="page-header"> | |||
<h3>AngularJS App</h3> | |||
</div> | |||
<h4>Today is {{day || "(unknown)"}}</h4> | |||
</div> | |||
</body> | |||
</html> | |||
</source> |
Revision as of 15:19, 25 May 2015
Good tutorials:
Example
<!DOCTYPE html>
<html ng-app="exampleApp" >
<head>
<title>AngularJS Demo</title>
<link href="bootstrap.css" rel="stylesheet" />
<link href="bootstrap-theme.css" rel="stylesheet" />
<script src="angular.js"></script>
<script>
var myApp = angular.module("exampleApp", []);
myApp.controller("dayCtrl", function ($scope) {
// controller statements will go here
});
</script>
</head>
<body>
<div class="panel" ng-controller="dayCtrl">
<div class="page-header">
<h3>AngularJS App</h3>
</div>
<h4>Today is {{day || "(unknown)"}}</h4>
</div>
</body>
</html>