You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 29, 2019. It is now read-only.
As you can see, in this file, i'm trying to ng-click="toggleOpen()" on a button that will handle expanding and colapsing. This would allow me to have other buttons and attach other events on the accordion header. I've had this working fine with my own code, but trying to standardize and use angular-ui bootstrap.
and it works fine, except for the fact that toggleOpen() is not available here . if i add toggleOpen() inside the template, it works just fine, but of course, it prevents me from calling any other methods on click from it's children.
Am i missing something here ?
The text was updated successfully, but these errors were encountered:
I think i've tried anything I could to get this working.
Today I tried setting $scope.isOpen = true from a custom method within my controller. Still no reaction from the Accordion. The only way I can get it open is by having toggleOpen() bound with ng-click inside the template, but that takes away my ability to have my own buttons with their own ng-clicks inside the {{heading}} .
The only other option I can think of, is to add something like {{heading}} {{buttons}} to the template, then have {{buttons}} render my buttons ... But I feel like that would be hacking the component, and atm i am not even sure how to achieve this.
Bottom line is that it would be ideal if I could access the component scope from within my controller/views so that I can trigger the open event from wherever I want.
I've also looked at how this is done in the demo with the button that calls ng-click="status.open = !status.open" but i fail to understand how this works in the demo. I have not been able to get it working in my code. I've had this behaviour setup and working before, but things stopped working once i took toggleOpen() out of the template
I am having trouble accessing template methods from within my code.
I have the need to customize accordion header, to include a set of buttons :
https://gist.github.com/kosz/7fc8532bed9e68753ff2#file-accordion_buttons-jade
As you can see, in this file, i'm trying to ng-click="toggleOpen()" on a button that will handle expanding and colapsing. This would allow me to have other buttons and attach other events on the accordion header. I've had this working fine with my own code, but trying to standardize and use angular-ui bootstrap.
I have implemented this template :
https://gist.github.com/kosz/7fc8532bed9e68753ff2#file-index-jade-snippet
and it works fine, except for the fact that toggleOpen() is not available here . if i add toggleOpen() inside the template, it works just fine, but of course, it prevents me from calling any other methods on click from it's children.
Am i missing something here ?
The text was updated successfully, but these errors were encountered: