Skip to content

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

Open
tysenmoore-xse wants to merge 8 commits into
mohsen1:masterfrom
tysenmoore-xse:master
Open

Added a watch on 'open' for dynamic open changes#41
tysenmoore-xse wants to merge 8 commits into
mohsen1:masterfrom
tysenmoore-xse:master

Conversation

@tysenmoore-xse

Copy link
Copy Markdown

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

mohsen1 commented Dec 17, 2015

Copy link
Copy Markdown
Owner

For this a simple $watch should be enough

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

@tysenmoore-xse

Copy link
Copy Markdown
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
Copy Markdown
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

mohsen1 commented Dec 18, 2015

Copy link
Copy Markdown
Owner

The singleton won't help much here.

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

Copy link
Copy Markdown

any update on this? Dynamic open attr would be fantastic

@mohsen1

mohsen1 commented May 10, 2016

Copy link
Copy Markdown
Owner

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

raygig commented Apr 19, 2017

Copy link
Copy Markdown

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