I am trying to do conditional transition in my router.js. I need to determine the condition(Which is eligibility) based on the boolean value returned by another rest service. Can I write a function to determine that value in router.js and how to use that value to redirect my transition to two separate routes. If the eligibity is true, I need to do this.route('coverage', { path: '/' }); else this.route('inEligible', { path: '/' });
Please provide me an example. I am very new to ember.
Aucun commentaire:
Enregistrer un commentaire