Angular 5 - how to use the component without model propertie
Angular 5 - how to use the component without model properties
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Manav PandyaPosted Jun 6, 2018, 6:25 AM
Bhairab DuttPosted Jun 6, 2018, 1:05 PM
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
Jayakumar BalasubramaniamPosted Jun 6, 2018, 5:28 AM