Open internetbird opened 8 years ago
Any errors logged in console?
@nkanand4 , no ,I don't get any errors. The event is just not fired.
hi, i've the same problem. for now i resolved removing ocLazyLoad and loading all controllers into index.html. but it's a shame. sometimes it's solved refreshing and clearing cache but it's not always true. it's not deterministic. no errors in console.
if you're using lazy loaded stuff in a template, you need to $compile it again after the lazy loading to make sure that angular maps it to the right functions / directives
no, i'm not using into a template. i'm using it only into app.js
i'm using with sb-admin, in this way.
$ocLazyLoadProvider.config({
debug : false,
events : true,
});
$stateProvider.state(
}).state('name_of_state', {
templateUrl : 'path_of_template',
controller : 'NameOfController',
resolve : {
loadMyFile : function($ocLazyLoad) {
$ocLazyLoad.load({
name : 'name_of_controller',
files : [ 'path_of_controller' ]
});
return true;
}
}
@dg14 from within loadMyFile, you should be returning the $ocLazyLoad.load returned promise instead of your "return true"?
Hi, I have a basic angular admin panel which is using the sbAdminApp template. When i am binding a basic template view everything is working as expected but when I add an ng-click event , it is not firing and I don't get any errors...
The function exists in the controller's scope because when I print it to the screen , I see the code. Here is some of my code:
For loading the files using ocLazyLoad:
This is the importLotteries.html template file:
And here is the controller's code: