Currently there are two ways to login:
when logging in for the first time and pressing the sign in button:
App.Auth.signin({
email: '[email protected]'
password: 'abc'
})
- Makes a request
/* hello.cpp | |
The Standard "hello world" program | |
Chandler Abraham August 25th, 2007 | |
*/ | |
# include <iostream> | |
using namespace std; | |
void showprogramHeader (); |
##EDIT possible solution: | |
OrganizationsNewController = Em.ObjectController.extend | |
fields: Em.Object.create | |
name: '', | |
##Original Question: | |
#this works, I can bind to name |
@resource 'organizations', path: "/orgs", -> | |
@resource 'show', path: ":organization_id", -> | |
@route 'settings' | |
visiting /orgs/17/settings renders 'settings' template into the outlet of the 'application' template. | |
I want it to render the templates into the outlets of the parents | |
settings -> show -> organizations -> application |
OrganizationRoute = Em.Route.extend | |
model: (params) -> | |
Organization.find(params.organization_id) | |
#visiting /orgs/5/settings renders the "organization" template, and the "organziation.settings" template | |
#in the "organization" template and OrganizationController context, I have access to the model setup above. | |
#in the "organziations.settings" template and OrganiationSettingsController context I have no model |
#scenario 1 /orgs/17/settings | |
OrganizationRoute = Em.Route.extend | |
model: (params) -> | |
model = Organization.find(params.organization_id) | |
@controllerFor('organizations').set 'selectedModel', model | |
OrganizationSettingsController = Em.Controller.extend | |
needs: 'organization' | |
organization: null | |
organizationBinding: 'controllers.organization' |
Router.map -> | |
@resource 'organizations', path: "/orgs", -> | |
@resource 'organization', path: ":organization_id", -> | |
@route 'settings' | |
@route 'home' | |
#no OrganizationsRoute, skipping for now don't need the page for all orgs yet | |
OrganizationsController = Em.ArrayController.extend | |
selectedModel: null |
App = Em.Application.create() | |
App.Router.map -> | |
@resource 'organizations', path: 'orgs', -> | |
@resource 'organization', path: ':organization_id', -> | |
@route 'index', path: '/' | |
@route 'settings' | |
# the route for all organizations | |
App.OrganizationsRoute = Em.Route.extend |
App.MyController = Ember.Controller.extend | |
aSelected: false | |
bSelected: true | |
showA: -> | |
@set 'bSelected', false | |
@set 'aSelected', true | |
showB: -> | |
@set 'bSelected', true | |
@set 'aSelected', false |
Currently there are two ways to login:
when logging in for the first time and pressing the sign in button:
App.Auth.signin({
email: '[email protected]'
password: 'abc'
})
App.Game = DS.Model.extend
players: DS.hasMany 'App.Player'
moreThanOnePlayer: (->