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
Reena Lakra
NA
146
56k
Undefined value when there is nested model.
May 30 2018 6:31 AM
I have two model with properties like :
export
class
Users {
UserId: string;
FirstName: string;
LastName: string;
}
export
class
Address{
AddressId: string;
Location: string;
PinCode: string;
}
Create one more model to call them, like
export
class
AddCustomers {
UserEntity: Users;
AddressEntity: Address;
}
But whenever, i trying to access like this:
myObject:AddCustomers=
new
AddCustomers();
myObject.UserEntity.FirstName=
"Tim"
;
// it display error, Firstname not defined
Reply
Answers (
3
)
Iam getting the error while creating angular4 project
Angular 5 - Best datagrid plugins