Передать параметр в директиву Angular 2+

import { Directive, ElementRef, Input, OnChanges, OnInit, TemplateRef, ViewContainerRef } from "@angular/core";

@Directive({
  selector: "[ladda]",
})
export class LaddaDirective {

  constructor(
    private templateRef: TemplateRef<any>,
    private viewContainer: ViewContainerRef
  ) {}

  @Input('ladda') set ladda(condition: boolean) {
    console.log({condition})
  }
}

Использование

<button style="padding: 20px 10px; border: 2px solid rgb(20, 160, 224); color: white;" 
    [ladda]="true"
    (click)="cl()">Del
</button>

Сама директива сделана верно Но при сборке ошибка что неизвестное своийство у кнопки/ Не могу понять в чем ошибка


Ответы (0 шт):