src/p4l/static/p4l/js/p4l.js
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--
update view simplification. Baby step towards complete form.


// initialize the app

var app = angular.module("recordApp", ['ngResource'])

app.service("Api", function($resource) {
    this.record = $resource(record_api_url);
});

app.controller("RecordCtrl", function($scope, Api){
    $scope.record = Api.record.get({recordId: record_id});
});

app.config(['$routeProvider', function($routeProvider) {
//    $routeProvider.when('/', {controller: 'RecordCtrl', templateUrl: 'partials/record.html'});
//    $routeProvider.otherwise({redirectTo: '/'});
  }]);