Skip to content

Instantly share code, notes, and snippets.

@ericf
Created January 5, 2012 00:29
Show Gist options
  • Select an option

  • Save ericf/1563042 to your computer and use it in GitHub Desktop.

Select an option

Save ericf/1563042 to your computer and use it in GitHub Desktop.
// 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