Created
January 5, 2012 00:29
-
-
Save ericf/1563042 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
| // Creates a new App and View instance. | |
| var app = new Y.App(), | |
| view = new Y.View(); | |
| // Overrides the view's `render()` method to render text into its `container`. | |
| view.render = function () { | |
| this.get('container').set('text', 'Hello World!'); | |
| return this; | |
| }; | |
| // Renders the app and view, then sets the view as the app's `activeView`. | |
| app.render().showView(view.render()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment