|
| 1 | +<!doctype html> |
| 2 | +<html lang="en" ng-app="angularApp"> |
| 3 | +<head> |
| 4 | + <meta charset="utf-8"> |
| 5 | + <link rel="stylesheet" href="css/app.css"> |
| 6 | + <link rel="stylesheet" href="css/bootstrap.css"> |
| 7 | + <link rel="stylesheet" href="css/intro.css"> |
| 8 | + <script src="lib/angular/angular.js"></script> |
| 9 | + <script src="lib/angular/angular-route.js"></script> <!-- needed for app js for routing --> |
| 10 | + <script src="lib/angular/angular-resource.js"></script> <!-- needed for services using ngResource --> |
| 11 | + <script src="js/intro-app.js"></script> |
| 12 | + <script src="js/intro-controllers.js"></script> |
| 13 | + <script src="js/intro-filters.js"></script> |
| 14 | + <script src="js/intro-directives.js"></script> |
| 15 | + <script src="js/intro-services.js"></script> |
| 16 | + |
| 17 | +</head> |
| 18 | +<body> |
| 19 | + <div class="section"> |
| 20 | + <h3>Resources</h3> |
| 21 | + <ol> |
| 22 | + <li><a href="http://angularjs.org/">Angular website</a> (with interactive examples and code)</li> |
| 23 | + <li><a href="http://docs.angularjs.org/tutorial/index">Tutorial</a> with <a href="https://github.com/angular/angular-phonecat/">GitHub code</a></li> |
| 24 | + <li><a href="http://docs.angularjs.org/guide/concepts">Angular Concepts</a></li> |
| 25 | + <li><a href="http://docs.angularjs.org/guide/controller">Controllers Guide</a></li> |
| 26 | + <li><a href="http://docs.angularjs.org/guide/filter">Filters Guide</a></li> |
| 27 | + <li><a href="http://docs.angularjs.org/guide/dev_guide.services.understanding_services">Services Guide</a></li> |
| 28 | + <li><a href="http://docs.angularjs.org/tutorial/step_07">Routing & Partials</a> (from tutorial)</li> |
| 29 | + <li><a href="http://docs.angularjs.org/guide/directive">Directives Guide</a></li> |
| 30 | + </ol> |
| 31 | + </div> |
| 32 | + <div class="section" ng-controller="introBindingCtrlByFunction"> |
| 33 | + <h3>Data binding and Scopes</h3> |
| 34 | + <div class='info'>using <code>introBindingCtrlByFunction</code> in <code>intro-controllers.js</code> </div> |
| 35 | + Search: <input ng-model="query"> |
| 36 | + <div id="status">Current search: {{query}}</div> |
| 37 | + Number of Characters in search: {{lengthOfInput()}} |
| 38 | + </div> |
| 39 | + <div class="section" ng-controller="introBindingCtrl"> |
| 40 | + <h3>Data binding, Scopes, Filter</h3> |
| 41 | + <div class='info'>using <code>introBindingCtrl</code> in <code>intro-controllers.js</code> </div> |
| 42 | + Search: <input ng-model="query"> |
| 43 | + <div id="status">Current filter: {{query}}</div> |
| 44 | + <div class="devices"> |
| 45 | + <div ng-repeat="device in devices | filter:query | orderBy:orderProp" class="row"> |
| 46 | + |
| 47 | + <span class='span1'><a href="#/devices/{{device.id}}">{{device.name}}</a></span> |
| 48 | + <span class='span1'>{{device.type}}</span> |
| 49 | + <span class='span2'>{{device.resolution}} (Full HD: {{device.resolution | check1080p }})</span> |
| 50 | + <span class='span1'>{{device.os}}</span> |
| 51 | + <span class='span1'>{{device.screen_size}}</span> |
| 52 | + </div> |
| 53 | + </div> |
| 54 | + </div> |
| 55 | + <div class="section" ng-controller="introBindingCtrl"> |
| 56 | + <h3>Directives</h3> |
| 57 | + <div class='info'>using |
| 58 | + <ol> |
| 59 | + <li><code>myDraggable</code> in <code>intro-directives.js</code></li> |
| 60 | + <li><code>myTabs</code> in <code>intro-directives.js</code></li> |
| 61 | + <li><code>myPane</code> in <code>intro-directives.js</code></li> |
| 62 | + </ol> |
| 63 | + </div> |
| 64 | + <h4>Custom Behaviour</h3> |
| 65 | + <div> |
| 66 | + <span my-draggable>Drag ME</span> |
| 67 | + <span my-draggable>Drag ME too</span> |
| 68 | + <span my-draggable>just add "my-draggable" as an attribute</span> |
| 69 | + </div> |
| 70 | + <br> |
| 71 | + <h4>Custom HTML Tags</h3> |
| 72 | + <my-tabs> |
| 73 | + <my-pane title="Hello"> |
| 74 | + <h5 id="creating-custom-directives_source_hello">Hello</h5> |
| 75 | + <p>Lorem ipsum dolor sit amet</p> |
| 76 | + </my-pane> |
| 77 | + <my-pane title="World"> |
| 78 | + <h5 id="creating-custom-directives_source_world">World</h5> |
| 79 | + <em>Mauris elementum elementum enim at suscipit.</em> |
| 80 | + <p><a href ng-click="i = i + 1">counter: {{i || 0}}</a></p> |
| 81 | + </my-pane> |
| 82 | + </my-tabs> |
| 83 | + |
| 84 | + </div> |
| 85 | + <div class="section" ng-controller="PhoneListCtrlNotUsingService"> |
| 86 | + <h3>Retrieving Data via AJAX</h3> |
| 87 | + <div class='info'>using <code>PhoneListCtrlNotUsingService</code> in <code>intro-controllers.js</code> </div> |
| 88 | + <textarea style='font-family: monospace; height: 150px; width: 100%'>{{phones | json }}</textarea> |
| 89 | + </div> |
| 90 | + <div class="section"> |
| 91 | + <h3>Routing and Services</h3> |
| 92 | + <div class='info'>using |
| 93 | + <ol> |
| 94 | + <li><code>angularApp</code> in <code>intro-app.js</code> (main app and dependencies)</li> |
| 95 | + <li><code>angularAppJS.config(['$routeProvider',...])</code> in <code>intro-app.js</code> (routing URLs to controllers and partials and putting it in ng-view)</li> |
| 96 | + <li><code>introServices</code> in <code>intro-services.js</code></li> |
| 97 | + </ol> |
| 98 | + </div> |
| 99 | + |
| 100 | + <div class="view-container"> |
| 101 | + <div ng-view class="view-frame"></div> |
| 102 | + </div> |
| 103 | + </div> |
| 104 | + |
| 105 | +</body> |
| 106 | +</html> |
| 107 | + |
| 108 | + |
0 commit comments