We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
uiSrefStatus
This plunker shows how to respond to changes in uiSref status using the uiSrefStatus events.
uiSref
https://plnkr.co/edit/PEWdPiLCYegixwdGAdb5?p=preview
@Component({ selector: 'my-app', directives: [UIROUTER_DIRECTIVES], template: ` <div class="nav"> <a uiSref="hello" uiSrefActive="active" (uiSrefStatus)="updated('hello', $event)">Hello</a> <a uiSref="about" uiSrefActive="active" (uiSrefStatus)="updated('about', $event)">About</a> <a uiSref="people" uiSrefActive="active" (uiSrefStatus)="updated('people', $event)">People</a> </div> <ui-view></ui-view> `}) export class App { active = { hello: false, about: false, people: false, } updated(state, event) { console.log(state, event); this.active[state] = event.active; console.log("active states", this.active); } }
It would be nice not to have to bind the sref target manually, i.e., updated($event) instead of updated('hello', $event).
updated($event)
updated('hello', $event)
We can add the sref target to the event so it can be used in a handler.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This plunker shows how to respond to changes in
uiSref
status using theuiSrefStatus
events.https://plnkr.co/edit/PEWdPiLCYegixwdGAdb5?p=preview
It would be nice not to have to bind the sref target manually, i.e.,
updated($event)
instead ofupdated('hello', $event)
.We can add the sref target to the event so it can be used in a handler.
The text was updated successfully, but these errors were encountered: