| author | ymh <ymh.work@gmail.com> |
| Wed, 04 Sep 2013 10:46:53 +0200 | |
| changeset 28 | f26426e9360b |
| parent 26 | a0e152dd1fad |
| child 33 | 945b144d68c1 |
| permissions | -rw-r--r-- |
| 26 | 1 |
|
2 |
// initialize the app |
|
3 |
||
4 |
var app = angular.module("recordApp", ['ngResource']) |
|
5 |
||
6 |
app.service("Api", function($resource) { |
|
7 |
this.record = $resource(record_api_url); |
|
8 |
}); |
|
9 |
||
10 |
app.controller("RecordCtrl", function($scope, Api){ |
|
|
28
f26426e9360b
update view simplification. Baby step towards complete form.
ymh <ymh.work@gmail.com>
parents:
26
diff
changeset
|
11 |
$scope.record = Api.record.get({recordId: record_id}); |
| 26 | 12 |
}); |
13 |
||
14 |
app.config(['$routeProvider', function($routeProvider) { |
|
15 |
// $routeProvider.when('/', {controller: 'RecordCtrl', templateUrl: 'partials/record.html'}); |
|
16 |
// $routeProvider.otherwise({redirectTo: '/'}); |
|
17 |
}]); |
|
|
28
f26426e9360b
update view simplification. Baby step towards complete form.
ymh <ymh.work@gmail.com>
parents:
26
diff
changeset
|
18 |