We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68ed8f1 commit 259f872Copy full SHA for 259f872
modules/angular2/src/router/route_registry.js
@@ -14,6 +14,15 @@ export class RouteRegistry {
14
15
config(parentComponent, config) {
16
17
+ if (!StringMapWrapper.contains(config, 'path')) {
18
+ throw new BaseException('Route config does not contain "path"');
19
+ }
20
+
21
+ if (!StringMapWrapper.contains(config, 'component') &&
22
+ !StringMapWrapper.contains(config, 'components')) {
23
+ throw new BaseException('Route config does not contain "component" or "components"');
24
25
26
var recognizer:RouteRecognizer;
27
if (MapWrapper.contains(this._rules, parentComponent)) {
28
recognizer = MapWrapper.get(this._rules, parentComponent);
0 commit comments