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
| <html ng-app="cotd"> | |
| <head> | |
| <title>Check out your device</title> | |
| <link rel="stylesheet" href="../bootstrap/css/bootstrap.css"> | |
| </head> | |
| <body> | |
| <h2>List of Devices</h2> | |
| <div ng-view></div> | |
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
| // create a module to support getting and managing the device list | |
| var deviceModule = angular.module('DeviceModule', []); | |
| // setup the service factory to create our items. Should retrieve from the server side db | |
| deviceModule.factory('Devices', function(){ | |
| var items = {}; | |
| items.query = function(){ | |
| return [ | |
| {id:0, name: "iphone", assetTag:"a23456", owner:"dev", desc:"iOS4.2"}, |
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
| // controllers | |
| function deviceListController($scope) | |
| { | |
| $scope.devices = [ | |
| {name: "iphone", assetTag:"a23456", owner:"dev", desc:"iOS4.2"}, | |
| {name: "loaner-laptop-1", assetTag:"a13936", owner:"dev", desc:""}, | |
| {name: "loaner-laptop-3", assetTag:"a43056", owner:"qa", desc:""}, | |
| {name: "android", assetTag:"a33756", owner:"dev", desc:"android2.4"}, | |
| {name: "galaxy tab", assetTag:"a53356", owner:"dev", desc:"android"}, |
NewerOlder