javascript - Knockout ViewModels -


in knockout can put data-bind in object isn't view model? trying make available whole page common settings or theme related values. don't want add them every view model.

i.e. data-bind="myglobalsingleton.prop"

yes can, property binding to, needs knockout observable within object. otherwise won't able use benefits of two-way binding.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -