Created
September 24, 2015 13:11
-
-
Save YasuakiHirano/b4ac20eb29e9289cd627 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var testApp = angular.module('testApp', []); | |
testApp.controller('PhoneListCtrl', function($scope){ | |
$scope.phones = [ | |
{'name': 'Nexus S', | |
'snippet': 'Fast just got faster with Nexus S.'}, | |
{'name': 'Motorola XOOM with Wi-Fi', | |
'snippet': 'The Next, Next Generation tablet.'}, | |
{'name': 'MOTOROLA XOOM', | |
'snippet': 'The Next, Next Generation tablet.'} | |
]; | |
}); | |
testApp.controller('FruitListCtrl', function($scope){ | |
$scope.fruits = [ | |
{'name': 'apple', 'color': 'red', 'no': 2}, | |
{'name': 'grape', 'color': 'violet', 'no': 3}, | |
{'name': 'orange', 'color': 'orange', 'no': 1} | |
]; | |
$scope.orderProp = 'no'; | |
}); | |
testApp.controller('DrinkListCtrl', function ($scope, $http) { | |
$http.get('drink.json').success(function(data) { | |
$scope.drinks = data; | |
}); | |
$scope.orderProp = 'no'; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment