Skip to content
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.

Not sure how to persist the selected #1

Closed
snebjorn opened this issue May 19, 2014 · 2 comments
Closed

Not sure how to persist the selected #1

snebjorn opened this issue May 19, 2014 · 2 comments
Labels

Comments

@snebjorn
Copy link

Hi, I was wondering how to save the selected.
I've tried using $watch on the 'selectData' but it doesn't seem to change.

How am I supposed to use this? The doc doesn't seem to cover that, only how to display it.

@snebjorn
Copy link
Author

$watchCollection works a bit better :)

@dotansimha
Copy link
Owner

You can use the regular $watch with "true" as the third paramter, as described here:
http://www.bennadel.com/blog/2566-scope-watch-vs-watchcollection-in-angularjs.htm

You can also use $watchCollection - it will do the trick :)

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

No branches or pull requests

2 participants