Created
September 7, 2010 19:29
-
-
Save charlesjolley/568908 to your computer and use it in GitHub Desktop.
This file contains 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', 'john@example.com'); | |
--- | |
contact.get('renderedTemplate'): | |
> '<h1>John Doe</h1><br><h2>john@example.com</h2>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment