support for `$watch`-ing any property on a vm
See original GitHub issueI’m trying to subscribe to any data changes made against any property on the vm, not just pre-defined property names. I couldn’t find any way to do it, so here’s my proposal.
I made an example here: http://jsfiddle.net/BBk3j/. In the first $watch
, I subscribe to changes on the foo
property. The next two $watch
statements would be my proposal to allow any watching for updates on any property. Either support a wildcard syntax (which I don’t think is a great idea, because *
is a valid property name in JS), or a better syntax that makes the string property name optional.
Issue Analytics
- State:
- Created 9 years ago
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Get-View Part 1: Introduction to Get-View - VMware Blogs
It may take some practice and some time to get to know what all can be found within the view of each object…...
Read more >Vue.js - How to properly watch for nested data - Stack Overflow
The $watch returns an unwatch function which will stop watching if it is called. var unwatch = vm.$watch('a', cb) // later, teardown the...
Read more >Virtual machine instances - Compute Engine - Google Cloud
Compute Engine instances support a declarative method for launching your applications using containers. When creating a VM or an instance template, you can ......
Read more >Computed Properties and Watchers - Vue.js
That's why for any complex logic, you should use a computed property. ... The function we provided will be used as the getter...
Read more >Diagnose a virtual machine network traffic filter problem
The steps that follow assume you have an existing VM to view the effective security rules for. If you don't have an existing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
this is how you do it with components… Thanks to usmanhalalit
My next question is how do I tell what changed?? like which variable??
When I console.log out the first argu I get the whole data object… which makes sense but is there a way to tell what specifically changed?
as mentioned by @guitcastro this still doesn’t mention how to watch an item within a list.
Say I have a list like so
If I do a watch on this using
How will I know what item has been mutated / changed?
This is the issue I, nor guys on my livestream can work out.