I am trying to get @Input to work with Typescript in Angular 2. I am getting the following error and I do not understand why.
[ts] Could not find login name. any
Below is the code for this component.
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-item',
templateUrl: './app-item.component.html',
styleUrls: ['./app-item.component.css']
})
export class AppItemComponent implements OnInit {
@Input item;
constructor() { }
ngOnInit() {}
}
The project and component were created using the Angular CLI. Why can't Typescript define an @Input decoration?
source
share