Skip to content

Commit ee240f2

Browse files
authored
Merge pull request #3069 from Akshat55/expressionchanged-input
fix: refresh view after content is initialized
2 parents 8494242 + a399c44 commit ee240f2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

integration/ng17/angular.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
{
4141
"type": "initial",
4242
"maximumWarning": "500kb",
43-
"maximumError": "1mb"
43+
"maximumError": "2mb"
4444
},
4545
{
4646
"type": "anyComponentStyle",

src/input/text-input-label.component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {
2+
AfterContentInit,
23
AfterViewInit,
34
ChangeDetectorRef,
45
Component,
@@ -102,7 +103,7 @@ import {
102103
</div>
103104
`
104105
})
105-
export class TextInputLabelComponent implements AfterViewInit {
106+
export class TextInputLabelComponent implements AfterViewInit, AfterContentInit {
106107
/**
107108
* Used to build the id of the input item associated with the `Label`.
108109
*/
@@ -210,6 +211,10 @@ export class TextInputLabelComponent implements AfterViewInit {
210211
}
211212
}
212213

214+
ngAfterContentInit() {
215+
this.changeDetectorRef.detectChanges();
216+
}
217+
213218
public isTemplate(value) {
214219
return value instanceof TemplateRef;
215220
}

0 commit comments

Comments
 (0)