Added test controller.
This commit is contained in:
parent
2e9c6e78ed
commit
385bc17cb4
1 changed files with 28 additions and 0 deletions
28
app/assets/javascripts/app/controllers/test.js.coffee
Normal file
28
app/assets/javascripts/app/controllers/test.js.coffee
Normal file
|
@ -0,0 +1,28 @@
|
|||
class App.TestController1 extends App.Controller
|
||||
constructor: ->
|
||||
super
|
||||
@showState = false
|
||||
@hideState = false
|
||||
@activeState = false
|
||||
@render()
|
||||
|
||||
meta: ->
|
||||
{}
|
||||
|
||||
show: =>
|
||||
@showState = true
|
||||
@render()
|
||||
|
||||
hide: =>
|
||||
@hideState = true
|
||||
@render()
|
||||
|
||||
active: (state) =>
|
||||
@activeState = state
|
||||
@render()
|
||||
|
||||
render: ->
|
||||
@html "<div>some test controller message:'#{@message}',show:'#{@showState}',hide:'#{@hideState}',active:'#{@activeState}'</div>"
|
||||
|
||||
url: ->
|
||||
"#/some/url/#{@message}"
|
Loading…
Reference in a new issue