3 category: JavaScript libraries
5 archived: This describes an older version of Angular.
12 * <https://github.com/angular/angular-seed>
13 * <https://angularjs.org/>
18 <html ng-app="nameApp">
23 <ul ng-controller="MyListCtrl">
24 <li ng-repeat="phone in phones">
33 <select ng-model="orderProp">
34 <option value="name">Alphabetical</option>
35 <option value="age">Newest</option>
41 App = angular.module('myApp', []);
43 App.controller('MyListCtrl', function ($scope) {
44 $scope.phones = [ ... ];
48 ### Controller with protection from minification
50 App.controller('Name', [
53 function ($scope, $http) {
66 App.service('NameService', function($http){
69 return $http.get(url);
74 In controller you call with parameter and will use promises to return data from server.
77 App.controller('controllerName',
78 function(NameService){
86 App.directive('name', function(){
88 template: '<h1>Hello</h1>'
93 In HTML will use `<name></name>` to render your template `<h1>Hello</h1>`
97 App.controller('PhoneListCtrl', function ($scope, $http) {
98 $http.get('/data.json').success(function (data) {