joe-l-bright
joe-l-bright

Reputation: 53

Can we access Ember.TEMPLATES in controller?

Is it possible to use Ember.TEMPLATES to check the existence of a template within a controller or component? I am using v1.12.1

We are currently transitioning to a route that is rendering a template that may not exist. Prior to the transition, we need an existence check of the template to determine whether we should transition.

Upvotes: 1

Views: 38

Answers (1)

caspg
caspg

Reputation: 399

Maybe this will work for you this.container.has('template:someName')

As a someName you can put i.e. inbox.index or inbox/index

Upvotes: 1

Related Questions