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

Popular posts from this blog

python - Alternative to referencing variable before assignment -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -