angularjs mobile v0.1

This commit is contained in:
life
2014-05-14 22:23:35 +08:00
parent 88ad35e9be
commit ab5e5c7b76
103 changed files with 12466 additions and 9 deletions

24
public/mobile2/js/app.js Normal file
View File

@ -0,0 +1,24 @@
'use strict';
function log(o) {
console.log(o);
}
angular.module('myApp', [
'ngTouch',
'ngRoute',
'ngAnimate',
'myApp.controllers',
'myApp.memoryServices'
]).
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'});
}]);