2014-05-14 22:23:35 +08:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
function log(o) {
|
|
|
|
console.log(o);
|
|
|
|
}
|
|
|
|
|
|
|
|
angular.module('myApp', [
|
|
|
|
'ngTouch',
|
|
|
|
'ngRoute',
|
|
|
|
'ngAnimate',
|
|
|
|
'myApp.controllers',
|
2014-05-14 22:35:56 +08:00
|
|
|
'myApp.services'
|
2014-05-14 22:23:35 +08:00
|
|
|
]).
|
|
|
|
config(['$routeProvider', '$interpolateProvider', function ($routeProvider, $interpolateProvider) {
|
|
|
|
|
|
|
|
$interpolateProvider.startSymbol('[[');
|
|
|
|
$interpolateProvider.endSymbol(']]');
|
|
|
|
|
|
|
|
$routeProvider.when('/notebooks', {templateUrl: '/public/mobile2/tpl/notebooks.html', controller: 'NotebookListCtrl'});
|
|
|
|
$routeProvider.when('/notes/:notebookId', {templateUrl: '/public/mobile2/tpl/notes.html', controller: 'NoteListCtrl'});
|
|
|
|
$routeProvider.when('/note/:noteId', {templateUrl: '/public/mobile2/tpl/note.html', controller: 'NoteCtrl'});
|
|
|
|
$routeProvider.otherwise({redirectTo: '/notebooks'});
|
|
|
|
}]);
|
|
|
|
|