This file contains 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
App.WhateverRoute = Ember.Route.extend | |
setupController: (controller) -> | |
applicationController = @controllerFor('application') | |
applicationController.set 'title', 'new title' | |
App.WhateverController = Ember.ObjectController.extend | |
setTitle: -> | |
@send('setTitle', 'new title') |
This file contains 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
# ROUTER | |
GWS.Router.map (match) -> | |
#match("/").to("home") # home.handlebars gets rendered automatically and mapped to / | |
# according to guide the previous logic shouldn't be needed. but it won't work without it | |
# you can either use model: () -> or | |
# setupController: (controller, model) -> | |
# controller.set 'content', model |
This file contains 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
# Create our application and namespace. | |
class Alfred extends Batman.App | |
@global yes | |
# setup our root route. When the app starts up, it will automatically call TodosController::index | |
@root 'todos#index' | |
# Define the principal Todo model with `body` and `isDone` attributes, and tell it to persist itself using Local Storage. | |
class Alfred.Todo extends Batman.Model |
This file contains 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
# Create our application and namespace. | |
class Alfred extends Batman.App | |
@global yes | |
# setup our root route. When the app starts up, it will automatically call TodosController::index | |
@root 'todos#index' | |
# Define the principal Todo model with `body` and `isDone` attributes, and tell it to persist itself using Local Storage. | |
class Alfred.Todo extends Batman.Model |