(Sorry for my english, it's not my first language...)
I have some issue with some input paramaters I inject in my component when I call it with its template.
slider-multiple.component.ts :
import { Component, Input } from '@angular/core';
@Component({
selector: 'slider-multiple',
templateUrl: './slider-multiple.component.html'
})
export class SliderMultipleComponent {
@Input() public modifiable: boolean;
}
slider-multiple.component.html :
<button *ngIf="modifiable">Slider Button</button>
Call of the directive (for instance on app.component.html) :
<slider-multiple modifiable="activation"></slider-multiple>
With activation defined on app.component.ts :
export class AppComponent {
public activation : boolean = false ;
public activate(){
this.activation = !this.activation;
}
}
The button I defined on the html template of my component should be visible (through the *ngIf) only when the activation parameter of the directive is at true.
Does anyone knows why it don't work as expected ?
A Stackblitz to help .
Thanks in advance !