how can I redirect to an external url from within a router?
or “route”
Guest____ has quit
diamondgfx joined the channel
svparijs has quit
locks
benlieb: window.location something like usual
r4m joined the channel
zeff joined the channel
nlh has quit
ckung has quit
Gandalfar has quit
plumbacon1 has quit
benlieb
locks: that’s what I ended up doing.
Gandalfar joined the channel
locks
👍
benlieb
How can I access the application controller in a route?
controllerFor?
safeforge has quit
zeff has quit
xkb has quit
xkb joined the channel
SaladFork
benlieb -- yes
this.controllerFor('application')
_makoto_ has quit
benlieb
why controllerFor in Route, but ‘needs’ in Controller?
kololololol joined the channel
_makoto_ joined the channel
mysterlune
controllerFor gets you a handle on the controller... needs in a controller is dependency injection... very different use cases.
CIDIC has quit
aroberts has quit
xkb is now known as k4r1m
k4r1m is now known as xkb
xkb is now known as k4r1m
khoapham
Hi there. Is there a way to render template into its parent outlet. I have a route /users/1/settings, I want to have the settings render in its own page. So I did this in its route: this.render({into: 'settings'});
I wonder if it's right to do?
locks
Needs is deprecated for Ember.inject.controller
benlieb
does Ember have a nice way to parse urls?
locks
benlieb: how so? It has the router
khoapham: just because the url is nested doesn't mean the route is
khoapham: you might run into problems with your approach
vvs joined the channel
khoapham: what does render into settings do though?
That looks like the default behaviour
mysterlune
@khaopham, using "into:" got me into tons of trouble before... try to avoid using that approach (use render into if you've got, like, a modal you need to render)
oak joined the channel
khaopham, templates will automatically render into their parent outlets (buffer)
plumbacon joined the channel
gambl0re has quit
would be better to hear a bit more about what you're trying to accomplish, though, before making any recommendations.
carterpa1ks joined the channel
gambl0re joined the channel
carterpa1ks
hi all. i've got a question about persisting data to the client side. i've got an app where i use an API to load a bunch of content. what's my best way to persist that on the client side for offline access?
carterpa1ks is now known as carterparks
lazybensch has quit
carterparks
i don't add anything to the API
it's just reading and caching
khoapham
locks: So each user will have their own settings, and user template include other thing that I don't want to show up in the setting view.
I just want to render settings template on their own page, and using the same model as from its parent (:user)
mysterlune: ^
safeforge joined the channel
mysterlune
try to leverage the `user.index` template for the user stuff. if you're using a `user` template, it will display the user info for every nested route
`user.index` will only display when your user is visiting the `user/1` path...