Using the user interface hash key in the event hash

I am using puppet version 1.2.3 and basic version 1.1.0

Here is my user interface and event hash:

ui:{ title : '#modelTypeTitle' }, events: { 'change @ui.title' : 'validateTitle' }, 

This is similar to what the documentation says: "You can also use the ui hash values ​​from events and trigger keys using" @ ui.elementName "

To clarify, I want to know why what I'm trying to do above does not work. but the following works just fine:

 events: { 'change #modelTypeTitle' : 'validateTitle' }, 
+7
marionette
source share
1 answer

Well, the problem is resolved after showing the version.

This function, parsing @ui. The hash syntax for events and triggers was recently added to 1.4.0 in early December. See Change Log: https://github.com/marionettejs/backbone.marionette/blob/master/changelog.md

Just upgrade your Marionette version to the latest stable version (1.4.1 currently) and the problem should be resolved.

* I just noticed this new feature thanks to your question. I still do not feel comfortable, now decided. One more evidence of helping others can help the person himself. :)

+9
source share

All Articles