Null check condition with object of object in ngModel in HTML in Angular
[(ngModel)] = "kodingAttittude?.Employee && kodingAttitude?.Employee.Name"
A Developer Hub
Null check condition with object of object in ngModel in HTML in Angular
[(ngModel)] = "kodingAttittude?.Employee && kodingAttitude?.Employee.Name"
to return the mock data from Observable in angular service
Error Message: Generic type 'Observer<T> requires 1 type argument(s)
getDropdownData(request: string): Observable<DropdownData[]>{
const params = new HttpParams().append('request', request);
return this.http.get<DropdownData[]>(this.rootURL +'Home/DropdownData', { params });
let data: DropdownData[] = [
{
'label': 'Circle',
'Id': '10'
},
{
'label': 'Rectangle',
'Id': '20'
},
{
'label': 'Triangle',
'Id': '30'
},
{
'label': 'Pentagone',
'Id': '40'
}
];
return new Observable((observer: Observer<DropdownData[]>) => {
observer.next(data);
observer.complete();
});
}
DesignationId column value of EMPLOYEE table should exists in DESIGNATION table while inserting the data in EMPLOYEE table
Severity Code Description Project File Line Suppression State Error MSB3027 Could not copy "obj\Debug\netcoreapp2.1\KodingAttitudeApp.dll" to "bin\Debug\netcoreapp2.1\KodingAttitudeApp.dll". Exceeded retry count of 10. Failed. The file is locked by: ".NET Core Host (9280)" KodingAttittudeApp C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets 4194
To resolve this issue
1. Close the Visual Studio Application and
2. Delete the obj and bin folders
if unable delete the bin folder and gets the error dialog box with Try again or Skip
"The action can't be completed because the file is open in dotnet.exe"
3. then go to Task Manager from the Task bar and select .NET Core Host and click on End task button. The the issue will be resolved