TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ramnath Bodke
1.5k
268
14.6k
How to assign value to class in angular 5?
Apr 23 2018 1:33 AM
I have angular class
export
class
Parameters
{
SearchString:
string
;
}
I have code in component.ts file
strparameters:Parameters;
ngOnInit() {
this
.strparameters.SearchString=
""
;
this
.dataservice.getEmployee(
this
.strparameters).subscribe((tempdate) =>{
this
.employeelist=tempdate;
})
,err=>{
console.log(err);
}
}
it gives me error -
ERROR TypeError: Cannot set property 'SearchString' of undefined
how can assign input value to SearchString in component.ts file ? please help here
Reply
Answers (
2
)
Typeahead in angular 5 usage for autocomplete search
Server side paging in angular datatable .