Skip to content

Instantly share code, notes, and snippets.

@blambeau
Created February 17, 2011 10:50
Show Gist options
  • Save blambeau/831484 to your computer and use it in GitHub Desktop.
Save blambeau/831484 to your computer and use it in GitHub Desktop.
An example of syntax
class Hello extends Brick
constructor: ->
# Cell for the current view
@current = new Cell
# View handler for #content
@content = new View
selector:
'#content'
url:
this.current
autorefresh:
this.current.changed
wInit: ->
this.current.set('hello1.html')
$(document).ready ->
this.HelloApp = new Hello
this.HelloApp.wRun()
#
# On the view side:
#
# <a onclick="HelloApp.current.set('hello1.html')">Hello1</a>
# <a onclick="HelloApp.current.set('hello2.html')">Hello2</a>
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment