Skip to content

Commit fe91bd3

Browse files
fix(uiview): Allow uiOnParamsChanged to work with states that have a componentProvider
Closes #3707
1 parent 19dfd9c commit fe91bd3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/directives/viewDirective.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -430,17 +430,16 @@ function $ViewDirectiveFill(
430430
}
431431

432432
// Wait for the component to appear in the DOM
433-
if (isString(cfg.viewDecl.component)) {
434-
const cmp = cfg.viewDecl.component;
435-
const kebobName = kebobString(cmp);
433+
if (isString(cfg.component)) {
434+
const kebobName = kebobString(cfg.component);
436435
const tagRegexp = new RegExp(`^(x-|data-)?${kebobName}$`, 'i');
437436

438437
const getComponentController = () => {
439438
const directiveEl = [].slice
440439
.call($element[0].children)
441440
.filter((el: Element) => el && el.tagName && tagRegexp.exec(el.tagName));
442441

443-
return directiveEl && angular.element(directiveEl).data(`$${cmp}Controller`);
442+
return directiveEl && angular.element(directiveEl).data(`$${cfg.component}Controller`);
444443
};
445444

446445
const deregisterWatch = scope.$watch(getComponentController, function(ctrlInstance) {

0 commit comments

Comments
 (0)