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

ERROR TypeError: childrenSrefs.concat is not a function #760

Closed
Vedeep opened this issue Apr 9, 2020 · 3 comments · Fixed by #811
Closed

ERROR TypeError: childrenSrefs.concat is not a function #760

Vedeep opened this issue Apr 9, 2020 · 3 comments · Fixed by #811

Comments

@Vedeep
Copy link

Vedeep commented Apr 9, 2020

Hello, please check the problem in the uiSrefActive directive(

this._srefChangesSub = this._srefs.changes.subscribe(srefs => this._srefs$.next(withHostSref(srefs)));
), it seems that srefs.toArray () is missing.

Example: http://plnkr.co/edit/NLgxhon9x316ltSd?open=lib%2Fapp.ts&deferRun=1
When we click "Test Link" a message appears in the console:

ERROR TypeError: childrenSrefs.concat is not a function
at withHostSref (VM513 uirouter-angular.umd.dew.js:1280)
at VM513 uirouter-angular.umd.dew.js:1286
at SafeSubscriber.schedulerFn [as _next] (VM517 core.umd.dew.js:30944)
at SafeSubscriber.__tryOrUnsub (VM381 Subscriber.dew.js:279)
at SafeSubscriber.next (VM381 Subscriber.dew.js:208)
at Subscriber._next (VM381 Subscriber.dew.js:140)
at Subscriber.next (VM381 Subscriber.dew.js:109)
at EventEmitter.Subject.next (VM400 Subject.dew.js:103)
at EventEmitter.emit (VM517 core.umd.dew.js:30887)
at QueryList.notifyOnChanges (VM517 core.umd.dew.js:31123)

@menuka-s
Copy link

I think the issue is that you have uiSrefActive="active" on a <li> tag at line 32. If you remove that in your plunker that error disappears

@tipsmiller
Copy link

I'm seeing a similar issue, but it looks like having uiSrefActive on an ancestor of an element with uiSref is supposed to work according to the docs Am I misunderstanding something?

@christopherthielen
Copy link
Member

it looks like having uiSrefActive on an ancestor of an element with uiSref is supposed to work according to the docs

Yes, this is supposed to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants