私はちょっと混乱しています。私はこのチュートリアルに従い、autheictaionを動作させようとしています。Angular.js定数に問題がありますか?
これは私のapp.js
// create main module, adding dependencies for ionic, angular router, angular mock and apps own modules
var jailbreak = angular.module('jailbreak', ['ionic', 'ui.router', 'map', 'chat', 'constant'])
jailbreak.run(function(AUTH_EVENTS) {
document.getElementById('debug').innerHTML = JSON.stringify(AUTH_EVENTS);
})
https://devdactic.com/user-auth-angularjs-ionic/
は、私が最初にステージ上でこだわっていることは、これは私のconstants.js
angular
.module('constant', [])
.constant('AUTH_EVENTS', {
notAuthenticated: 'auth-not-authenticated',
notAuthorized: 'auth-not-authorized'
})
.constant('USER_ROLES', {
admin: 'admin_role',
public: 'public_role'
});
あなたは何を得ていますか? – MaKCbIMKo
AUTH_EVENTSに空のヌルを表示しようとしているとき – Ryan