Despite following other answers, I am still encountering an error. Can you help me figure out what's wrong?
To provide some context, here is the code for my component:
import { Component, OnInit, Input } from '@angular/core';
@Component({
selector: 'app-autocomplete',
templateUrl: './autocomplete.component.html',
styleUrls: ['./autocomplete.component.css']
})
export class AutocompleteComponent implements OnInit {
@Input() datatype: number;
constructor() { }
ngOnInit() {
}
}
This is how I'm using it in the HTML:
<autocomplete [datatype]="2"></autocomplete>
I have relied on Angular CLI to setup everything correctly within the module. Any thoughts on why I might be facing this error?