Adding active class to router link element as well and cleaned up code.
This commit is contained in:
parent
39ed96ccb4
commit
50c4a75b49
@ -34,10 +34,8 @@ class RouterLink extends IgniteElement {
|
|||||||
render() {
|
render() {
|
||||||
return this.template
|
return this.template
|
||||||
.onClick((event) => this.onClick(event))
|
.onClick((event) => this.onClick(event))
|
||||||
.child(
|
.class(this.active, value => value ? "active" : null)
|
||||||
new slot(this)
|
.child(new slot(this).class(this.active, value => value ? "active" : null));
|
||||||
.class(this.active, (value) => { return value ? "active" : null })
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ready() {
|
ready() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user