This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Executing a route without a template #3138
Closed
Description
This has been opened and closed a few times
- Route functions (no templates) #1901
- $RouteProvider should activate controller, even when no templateUrl or template is passed #1838
I may have found a use case where it's a valid to execute a route that doesn't have an associated template. Imagine a page that launches various modal windows with the requirement to be able to deep-link directly to the page with a dialog open.
The only difference between the modals are the title & text, so the $rootScope
is responsible for setting up and launching a modal, and the controller simply provides route specific content.
A workaround is to set { controller: 'fooCtl', template: ' ' }
, but it'd be nice to leave the template property out altogether.
Here's a fiddle that shows the problem and workaround: http://jsfiddle.net/EGfAX/5/