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() {
|
||||
return this.template
|
||||
.onClick((event) => this.onClick(event))
|
||||
.child(
|
||||
new slot(this)
|
||||
.class(this.active, (value) => { return value ? "active" : null })
|
||||
);
|
||||
.class(this.active, value => value ? "active" : null)
|
||||
.child(new slot(this).class(this.active, value => value ? "active" : null));
|
||||
}
|
||||
|
||||
ready() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user