From 385bc17cb4a3338e7f522d23e5dc99a5a8da3d20 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 5 May 2016 11:35:39 +0200 Subject: [PATCH] Added test controller. --- .../app/controllers/test.js.coffee | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 app/assets/javascripts/app/controllers/test.js.coffee diff --git a/app/assets/javascripts/app/controllers/test.js.coffee b/app/assets/javascripts/app/controllers/test.js.coffee new file mode 100644 index 000000000..64fe57aeb --- /dev/null +++ b/app/assets/javascripts/app/controllers/test.js.coffee @@ -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 "
some test controller message:'#{@message}',show:'#{@showState}',hide:'#{@hideState}',active:'#{@activeState}'
" + + url: -> + "#/some/url/#{@message}"