Table of Contents
monacaでangularjsとonsenui使うときこんな書き方があるらしい、
上下どちらの書き方でも同じだけど、androidだとonsenuiに関連するエラーが上部では出てしまう。iosだとエラーはでないけど。
var module = ons.bootstrap('my-app', ['onsen']);
document.addEventListener ("deviceready", onDeviceReady, false);
//this function runs when phoneGap is ready
function onDeviceReady () {
console.log('PhoneGap is ready!!!');
}
module.controller('mainCtrl', function($scope, $http, $sce, $q) {
// いろいろ処理
});
こっちだとandroidでもエラーがでなかった。
var module = angular.module('my-app', ['onsen']);
document.addEventListener ("deviceready", onDeviceReady, false);
//this function runs when phoneGap is ready
function onDeviceReady () {
console.log('PhoneGap is ready!!!');
}
module.controller('mainCtrl', function($scope, $http, $sce, $q) {
// いろいろ処理
});

