samedi 27 juin 2015

Pass property to component and then used it as conditonal (ember js)

application controler

isHotel_profile: function (){
    return this.get('currentPath') === 'hotel';
}.property('currentPath'),

component

{{#step-controller hotelPage=isHotel_profile}} {{/step-controller}}

and here's the component template

{{#if hotelPage}}
 hotel page 
{{else}}
 not hotel page
{{/if}}

i want to use the property as conditional how can i achieve that




Aucun commentaire:

Enregistrer un commentaire