Angular 5 - how to use the component without model propertie
Angular 5 - how to use the component without model properties
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Manav PandyaRank #166 · 14.3K reputationPosted Jun 6, 2018, 2:25 AM EDT
Jayakumar BalasubramaniamRank #267 · 9.5K reputationPosted Jun 6, 2018, 1:28 AM EDT
Bhairab DuttRank #799 · 2.9K reputationPosted Jun 6, 2018, 9:05 AM EDT
Yes , You can use component without model .
In the compoent.ts file , You can use any property as:
model : any and get the data in it.
If you want to get the values from form you can simply use model with the form as property and after that add model.empname , model.address etc .
And on submit button pass the model and with the method in the compoent get the model and perform the required operation which you want.
Hope its help you .Please accept the answer if its hep you .
Thanks