I have an isAuthenticated property in a service that is currently being entered on my application route, how can I calculate the property from the entered service on my route?
export default Ember.Route.extend({
session : Ember.inject.service('market-session'),
isUser : Ember.computed.oneWay('session.IsAuthenticated'),
}
Is it possible? The template cannot get the value.
Inside the template -
{{#if isUser}}
User is authenticated
{{else}}
User log in form
{{/if}}
This computed property only works if I transfer it to the controller, should it work both on the route and on the controller? Did I miss something?
source
share