Skip to content

@Input, @Output Properties  #95

Closed
@doczoidberg

Description

@doczoidberg

I tried to add @input, @output Properties to a component:

@Component({selector: 'todo-cmp'})
class TodoCmp {
  @Input() model;
  @Output() complete = new EventEmitter(); // TypeScript supports initializing fields

  onCompletedButton() {
    this.complete.next(); // this fires an event
  }
}

But i get the error:
[DiffingTSCompiler]: Typescript found the following errors: app/app1.ts (13, 4): Cannot find name 'Input'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions