@Input, @Output Properties
See original GitHub issueI 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'.
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Sharing data between child and parent directives ... - Angular
@Output() marks a property in a child component as a doorway through which data can travel from the child to the parent. The...
Read more >Input() and @Output() properties - Angular Hispano
@Input() and @Output() allow Angular to share data between the parent context and child directives or components. An @Input() property is writable while...
Read more >Input and output properties - IBM
You can specify the properties that a sub-model expects as input from its parent model or external system. These properties are referred to...
Read more >Angular @input, @output & EventEmitter - TekTutorialsHub
The @output defines the output property (event), which we raise in the child component using the EventEmitter . The parent listens to these...
Read more >Input and Output in Angular - Medium
“Input” and “Output” are defined in “Child component”. Sometimes we need to put information or object for initialization in “Child component” for that...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you’re using Angular Alpha 46, you should import the following for the code that you sent:
If you update to the latest Alpha 48:
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.