Created
September 7, 2010 19:29
-
-
Save charlesjolley/568908 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contact = HandlebarsView.create({ | |
template: "<h1>{firstName} {lastName}</h1><br><h2>{emailAddress}</h2>" | |
}); | |
-- | |
// AUTOMATICALLY observes properties referenced in the template | |
contact.set('firstName', 'John'); | |
contact.set('lastName', 'Doe'); | |
contact.set('emailAddress', '[email protected]'); | |
--- | |
contact.get('renderedTemplate'): | |
> '<h1>John Doe</h1><br><h2>[email protected]</h2>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment