1
我是angularJS新手,我试图找出在angularJS phonegap应用中使用azure移动服务的方式。我发现这个“角Azure的移动服务” https://github.com/TerryMooreII/angular-azure-mobile-service/但被卡在第三步:在Angular phonegap应用中使用Azure移动服务
angular.module('myapp', ['myApp.controllers', 'myApp.services', 'azure-mobile-service.module']);
这是我原来的代码:
(function(){
'use strict';
var module = angular.module('app', ['onsen']);
module.controller('AppController', function($scope, $data) {
$scope.doSomething = function() {
setTimeout(function() {
alert('tappaed');
}, 100);
};
});
module.controller('DetailController', function($scope, $data) {
$scope.item = $data.selectedItem;
});
module.controller('MasterController', function($scope, $data) {
$scope.items = $data.items;
$scope.showDetail = function(index) {
var selectedItem = $data.items[index];
$data.selectedItem = selectedItem;
$scope.ons.navigator.pushPage('detail.html', {title : selectedItem.title});
};
});
module.factory('$data', function() {
var data = {};
data.items = [
{
title: 'Item 1 Title',
label: '4h',
desc: 'Lorem ipsum dolor sit amet'
},
{
title: 'Another Item Title',
label: '6h',
desc: 'Ut enim ad minim veniam.'
},
{
title: 'Yet Another Item Title',
label: '1day ago',
desc: 'Duis aute irure '
},
{
title: 'Yet Another Item Title',
label: '1day ago',
desc: 'Duis aute irure.'
}
];
return data;
});
})();
这里是我的文件结构: http://1drv.ms/1yA6VmF
我该如何在我的项目中使用这个“angular-azure-mobile-service”?任何帮助,将不胜感激!谢谢!!