2016-04-10 39 views
0

Angular ve Meteor'da oldukça yeniyim. Angular-Meteor kullanarak bir proje oluşturmaya çalışıyorum.Açısal-meteor projesinde açısal-acl nasıl kullanılır?

Angular app.js bölümünün bir kısmı aşağıdaki gibidir.

import AclService from 'angular-acl'; 
angular.module('myApp', [angularMeteor, uiRouter,AclService, 'accounts.ui']); 

Angular-ACL eklentisini kullanmaya çalışıyorum.

Uygulamayı çalıştırdığımda, tarayıcı konsolunda aşağıdaki hatayı alıyorum.

VM4605 modules.js?hash=afc491d…:232 Uncaught Error: [$injector:modulerr] 

Failed to instantiate module myApp due to: 
Error: [$injector:modulerr] Failed to instantiate module {} due to: 
Error: [ng:areq] Argument 'module' is not a function, got Object 
http://errors.angularjs.org/1.5.3/ng/areq?p0=module&p1=not%20a%20function%2C%20got%20Object 
    at http://localhost:3000/packages/modules.js?hash=afc491df237c732f4ec721460c9455fc18cc0d9d:232:12 
    at assertArg (http://localhost:3000/packages/modules.js?hash=afc491df237c732f4ec721460c9455fc18cc0d9d:2008:11) 
    at assertArgFn (http://localhost:3000/packages/modules.js?hash=afc491df237c732f4ec721460c9455fc18cc0d9d:2018:3) 
    at http://localhost:3000/packages/modules.js?hash=afc491df237c732f4ec721460c9455fc18cc0d9d:4697:11 
    at forEach (http://localhost:3000/packages/modules.js?hash=afc491df237c732f4ec721460c9455fc18cc0d9d:485:20) 
    at loadModules (http://localhost:3000/packages/modules.js?hash=afc491df237c732f4ec721460c9455fc18cc0d9d:4672:5) 
    at http://localhost:3000/packages/modules.js?hash=afc491df237c732f4ec721460c9455fc18cc0d9d:4689:40 
    at forEach (http://localhost:3000/packages/modules.js?hash=afc491df237c732f4ec721460c9455fc18cc0d9d:485:20) 
    at loadModules (http://localhost:3000/packages/modules.js?hash=afc491df237c732f4ec721460c9455fc18cc0d9d:4672:5) 
    at createInjector (http://localhost:3000/packages/modules.js?hash=afc491df237c732f4ec721460c9455fc18cc0d9d:4594:19) 
http://errors.angularjs.org/1.5.3/$injector/modulerr?p0=%7B%7D&p1=Error%3A%…2Fmodules.js%3Fhash%3Dafc491df237c732f4ec721460c9455fc18cc0d9d%3A4594%3A19) 
    at http://localhost:3000/packages/modules.js?hash=afc491df237c732f4ec721460c9455fc18cc0d9d:232:12 
    at http://localhost:3000/packages/modules.js?hash=afc491df237c732f4ec721460c9455fc18cc0d9d:4711:15 
    at forEach (http://localhost:3000/packages/modules.js?hash=afc491df237c732f4ec721460c9455fc18cc0d9d:485:20) 
    at loadModules (http://localhost:3000/packages/modules.js?hash=afc491df237c732f4ec721460c9455fc18cc0d9d:4672:5) 
    at http://localhost:3000/packages/modules.js?hash=afc491df237c732f4ec721460c9455fc18cc0d9d:4689:40 
    at forEach (http://localhost:3000/packages/modules.js?hash=afc491df237c732f4ec721460c9455fc18cc0d9d:485:20) 
    at loadModules (http://localhost:3000/packages/modules.js?hash=afc491df237c732f4ec721460c9455fc18cc0d9d:4672:5) 
    at createInjector (http://localhost:3000/packages/modules.js?hash=afc491df237c732f4ec721460c9455fc18cc0d9d:4594:19) 
    at doBootstrap (http://localhost:3000/packages/modules.js?hash=afc491df237c732f4ec721460c9455fc18cc0d9d:1874:20) 
    at bootstrap (http://localhost:3000/packages/modules.js?hash=afc491df237c732f4ec721460c9455fc18cc0d9d:1895:12) 
http://errors.angularjs.org/1.5.3/$injector/modulerr?p0=myApp&p1=Er…2Fmodules.js%3Fhash%3Dafc491df237c732f4ec721460c9455fc18cc0d9d%3A1895%3A12)(anonymous function) @ VM4605 modules.js?hash=afc491d…:232(anonymous function) @ VM4605 modules.js?hash=afc491d…:4711forEach @ VM4605 modules.js?hash=afc491d…:485loadModules @ VM4605 modules.js?hash=afc491d…:4672createInjector @ VM4605 modules.js?hash=afc491d…:4594doBootstrap @ VM4605 modules.js?hash=afc491d…:1874bootstrap @ VM4605 modules.js?hash=afc491d…:1895angularInit @ VM4605 modules.js?hash=afc491d…:1780(anonymous function) @ VM4605 modules.js?hash=afc491d…:30873fire @ VM4606 jquery.js?hash=649d9f4…:3185self.fireWith @ VM4606 jquery.js?hash=649d9f4…:3297jQuery.extend.ready @ VM4606 jquery.js?hash=649d9f4…:3509completed @ VM4606 jquery.js?hash=649d9f4…:3540 

Neyin yanlış gittiğine dair herhangi bir fikir var mı?

cevap

0

Tamam Yemin ederim ki bu yana dünden beri bir cevap arıyordum. Ancak bu soruyu yayınlamadan önce Google’a yeterince sahip değildim. Bunun için gerçekten üzgünüm.

neyse cevap myself.The gerekli uç takip eder ve her şey şimdi iyi çalışıyor gibi ben kodumu değiştirdi [angularJS]How to use angular-acl?

makaleden geldi bulundu.

angular.module('myApp', [angularMeteor, uiRouter,'mm.acl', 'accounts.ui']); 

şöyle Eğik-ACL açısal-acl.js tanımlanır ki (Sanırım) eklentidir Bunun nedeni.

angular.module('mm.acl').provider('AclService', [ 
    function() { 

Bu, benzer bir sorunu olan başkalarına yardımcı olur umarım. Şerefe!

İlgili konular