Closed
Description
export class DefaultLayoutComponent implements OnDestroy, OnInit {
ngOnInit(): void {
this.navItems = navItems;
setTimeout(() => {
this.navItems = [{
name: 'a',
url: 'b'
}];
}, 3000);
}
}
For the above code, the component will prepend an item instead of replacement.
Is this behavior intended or a bugs?
For semantic meaning, reassigning variables seems to be referring to replacement instead of prepend.
Thanks