fix(angular1_router): support templateUrl components

This commit is contained in:
Peter Bacon Darwin 2016-02-10 16:59:26 -08:00 committed by Vikram Subramanian
parent 1174473e9c
commit 5586c29492
2 changed files with 7 additions and 2 deletions

View File

@ -200,6 +200,7 @@ function ngOutletFillContentDirective($compile) {
function routerTriggerDirective($q) { function routerTriggerDirective($q) {
return { return {
require: '^ngOutlet', require: '^ngOutlet',

View File

@ -139,8 +139,12 @@ describe('router', function () {
bindings: options.bindings, bindings: options.bindings,
controller: getController(options), controller: getController(options),
}; };
if (options.template) definition.template = options.template; if (options.template) {
if (options.templateUrl) definition.templateUrl = options.templateUrl; definition.template = options.template;
}
if (options.templateUrl) {
definition.templateUrl = options.templateUrl;
}
applyStaticProperties(definition, options); applyStaticProperties(definition, options);
$compileProvider.component(name, definition); $compileProvider.component(name, definition);