Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app-sidebar-nav navItems reassignment #126

Open
nealyip opened this Issue Dec 9, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@nealyip
Copy link

nealyip commented Dec 9, 2018

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

@emilynielson

This comment has been minimized.

Copy link

emilynielson commented Dec 26, 2018

I'm having the same issue. Is there a way to reassign it and get the navbar to only show the reassignment?

@xidedix xidedix self-assigned this Feb 13, 2019

xidedix added a commit to coreui/coreui-angular that referenced this issue Feb 15, 2019

refactor: drop `Replace`
- fix(sidebar): navItems reassignment bug [#126](coreui/coreui-free-angular-admin-template#126), [#42](coreui/coreui-free-angular-admin-template#42), #12
- refactor(aside): drop `Replace`
- refactor(breadcrumb): drop `Replace` new component `cui-breadcrumb` (migration needed)
- refactor(footer): minor changes
- refactor(header): drop `Replace`
- refactor(layout): cleanup
- refactor(sidebar-nav): drop `Replace`, redesign
@xidedix

This comment has been minimized.

Copy link
Collaborator

xidedix commented Feb 15, 2019

@nealyip @emilynielson
please update @coreui/angular dependency to 2.4.1
and let us know if this helps

@xidedix xidedix referenced this issue Feb 18, 2019

Merged

v2.4.0 #140

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.