ocombe / ocLazyLoad

Lazy load modules & components in AngularJS
https://oclazyload.readme.io
MIT License
2.63k stars 510 forks source link

controller loaded but the page is blank #330

Closed HDaghash closed 8 years ago

HDaghash commented 8 years ago

hello and thanks for this effort ,

i'm trying to use ocLazyLoad but it's not working in my case and it gives blank page but i can see the controller in the dev tool , i think the view not loaded and the controller not being called

my code in route :

state('index', {
                     url: "/index", 
                     views: {
                         "lazyLoadView": {
                             controller: 'brokers', 
                             templateUrl: 'app/home/index.html'
                         }
                     },
                     resolve: { 
                         loadMyCtrl: ['$ocLazyLoad', function ($ocLazyLoad) {
                             return $ocLazyLoad.load({
                                 name: 'app',
                                 files: ['app/home/brokerPortal.js']
                             });
                         }]
                     }

my console in dev mode

 ocLazyLoad.fileLoaded app/home/brokerPortal.js
ocLazyLoad.componentLoaded ["app", "register", "brokers"]
 ocLazyLoad.moduleReloaded app

Thanks in advance .

HDaghash commented 8 years ago

sorry ma bad , i miss to update ui view

<div ui-view="lazyLoadView"></div>

please close this