fix(angular1_router): support templateUrl components
This commit is contained in:
parent
1174473e9c
commit
5586c29492
|
@ -200,6 +200,7 @@ function ngOutletFillContentDirective($compile) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function routerTriggerDirective($q) {
|
function routerTriggerDirective($q) {
|
||||||
return {
|
return {
|
||||||
require: '^ngOutlet',
|
require: '^ngOutlet',
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue