AngularJS

From Wiki
Revision as of 16:09, 25 May 2015 by Scott (talk | contribs) (Example)
Jump to navigation Jump to search

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>

Utility methods

angular.isString(o);
angular.lowercase(o);
angular.uppercase(o);