ember.js - Specify a login only template in Ember -
is there way in emberjs have separate template login doesn't render rest of application template? ideally create login component, can't figure out how render on login
route without being wrapped in application template.
unfortunately there isn't. there might clever hacks, there's no way out of box. however, had same problem , solved using simple if statement. can use currentroutename
property current route name, allows this:
application controller
isloginroute: ember.computed('currentroutename', { get() { return (this.get('currentroutename') === 'login'); } })
application template
{{#if isloginroute}} {{outlet}} {{else}} <div> <span>some content</span> {{outlet}} </div> {{/if}}
Comments
Post a Comment