Skip to content Skip to sidebar Skip to footer

Ng-click Not Firing, Deep Inside Ui-views

I am using AngularJS and ui-router. I have a submenu which opens when they click their username, inside of which I want a logout button. It's a div with an ng-click that should log

Solution 1:

Fixed. I had to add a z-index of 1 to the css of the sub-menu. Turns out it was behind another item...

z-index: 1;

Solution 2:

If that doesn't fire it's because the ng-click directive can't find the logout method in the current scope. That would mean that it is nested in a directive which creates an isolate scope. Normally, a scope prototypically inherits from its parent. An isolated scope does not. So it cannot access any properties or methods from an ancestor because it doesn't have one.

Post a Comment for "Ng-click Not Firing, Deep Inside Ui-views"