Skip to content

@Input, @Output Properties  #95

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'.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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