Não sei o que pode ser, estava funcionando:
<div class="form-group">
<label>Descrição</label>
<textarea name="descricao" formControlName="descricao" [(ngModel)]="foto.descricao" class="form-control" autocomplete="off">
</textarea>
</div>
<button nome="Salvar" tipo="submit" estilo="btn-primary" [desabilitado]="!meuForm.valid">
Salvar
</button>
<a [routerLink]="['']" class="btn btn-primary">Voltar</a>
<hr>
</div>
<button (click)="executaAcao()" class="btn {{estilo}}" [type]="tipo" [disabled]="desabilitado">{{nome}}</button>
import { Component, Input, Output, EventEmitter } from '@angular/core';
@Component({
moduleId: module.id,
selector: 'botao',
templateUrl: './botao.component.html'
})
export class BotaoComponent {
@Input() nome: string = 'Ok';
@Input() estilo: string = 'btn-default';
@Input() tipo: string = 'button';
@Input() desabilitado: boolean = false;
@Output() acao = new EventEmitter();
@Input() confirmacao: boolean = false;
executaAcao() {
if(this.confirmacao) {
if(confirm('Tem certeza?')) {
this.acao.emit(null);
}
return;
}
this.acao.emit(null);
}
}
Can't bind to 'desabilitado' since it isn't a known property of 'button'. ("
"): CadastroComponent@31:69 ; Zone: ; Task: Promise.then ; Value: Error: Template parse errors: Can't bind to 'desabilitado' since it isn't a known property of 'button'. ("
O mais estranho é que esse é o erro de console, no prompt tem outro erro:
node_modules/rxjs/Subject.d.ts(16,22): error TS2415: Class 'Subject' incorrectly extends base class 'Observable'. Types of property 'lift' are incompatible. Type '(operator: Operator) => Observable' is not assignable to type '(operator: Operator) => Observable'. Type 'Observable' is not assignable to type 'Observable'. Type 'T' is not assignable to type 'R'. node_modules/rxjs/observable/dom/WebSocketSubject.d.ts(23,22): error TS2415: Class 'WebSocketSubject' incorrectly extends base class 'AnonymousSubject'. Types of property 'lift' are incompatible. Type '(operator: Operator) => WebSocketSubject' is not assignable to type '(operator: Operator) => Observable'. Type 'WebSocketSubject' is not assignable to type 'Observable'. Types of property 'operator' are incompatible. Type 'Operator' is not assignable to type 'Operator'. Type 'R' is not assignable to type 'T'.