angularjs mobile v0.1
This commit is contained in:
24
public/mobile2/js/app.js
Normal file
24
public/mobile2/js/app.js
Normal 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'});
|
||||
}]);
|
||||
|
Reference in New Issue
Block a user