Skip to content

Commit d80cdeb

Browse files
committed
docs($routeProvider): document that one of template or templateUrl is required
Closes angular#8604
1 parent 6d33294 commit d80cdeb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ngRoute/route.js

+4
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ function $RouteProvider() {
105105
* - `{Array.<Object>}` - route parameters extracted from the current
106106
* `$location.path()` by applying the current route
107107
*
108+
* One of `template` or `templateUrl` is required.
109+
*
108110
* - `templateUrl` – `{(string|Function)=}` – path or function that returns a path to an html
109111
* template that should be used by {@link ngRoute.directive:ngView ngView}.
110112
*
@@ -113,6 +115,8 @@ function $RouteProvider() {
113115
* - `{Array.<Object>}` - route parameters extracted from the current
114116
* `$location.path()` by applying the current route
115117
*
118+
* One of `templateUrl` or `template` is required.
119+
*
116120
* - `resolve` - `{Object.<string, Function>=}` - An optional map of dependencies which should
117121
* be injected into the controller. If any of these dependencies are promises, the router
118122
* will wait for them all to be resolved or one to be rejected before the controller is

0 commit comments

Comments
 (0)