Quantcast
Viewing all articles
Browse latest Browse all 4827

Import routers with it functions to services

@1117 wrote:

Is it possible to import route like ember.router in service to call router functions.

For exmaple I have router with CanMixin:
export default Ember.Router.extend(CanMixing,{ … canVisit(){ return this.can(‘veiw page’); } … })

and I want use router.canVist() in my service, and not only this one router. The idea to import all routes in one servise and call this services in the moment of authorization to check possibility does user can visit some pages

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4827

Trending Articles