Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a watch on 'open' for dynamic open changes #41

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

tysenmoore-xse
Copy link

This is a simple change to implement #34. I am a little green at some of this stuff so this may not be the best approach. I tested the changes with simple collapse all/none buttons and they seemed to work well--redrew the content when a button was pressed.

@mohsen1
Copy link
Owner

mohsen1 commented Dec 17, 2015

For this a simple $watch should be enough

scope.$watch('open', function(value) { scope.isOpen = !!value; }); 

@tysenmoore-xse
Copy link
Author

I only modified the src version, I was unclear if the dist version was generated as well as the minified versions. Let me know if there is more integration needed.

@tysenmoore-xse
Copy link
Author

I treated it as a singleton because I was not sure if the watch would be added on every link phase. If you'd prefer I could remove the singleton approach.

@mohsen1
Copy link
Owner

mohsen1 commented Dec 18, 2015

The singleton won't help much here.

- Changed open watch to no longer be a singleton
@DmitryEfimenko
Copy link

any update on this? Dynamic open attr would be fantastic

@mohsen1
Copy link
Owner

mohsen1 commented May 10, 2016

My plan is to use json-formatter-js for internally in this directive (#35) . That will make this directive a thin wrapper around the core lib. If you have time to do it I'll help merging and releasing it.

@raygig
Copy link

raygig commented Apr 19, 2017

Any chance we can have the watched open attribute? Whats the status of this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants