Answer the question
In order to leave comments, you need to log in
How to pass parameter from form without ng-model?
I deal with Angular recently)
Situation:
Adding a comment to the news, I connect the text field and the user using ng-model, send it by POST, everything is sent. But I need to send the ID of the news to which the comment belongs! So I fell into a stupor! News on page 20, respectively, and 20 ID, I can get the ID itself, but how to send it to the add method ?! If I write the same way through ng-model, then by itself it is empty there! Here's a sample code!
<input type="text" ng-model='com.lnk' value="{{item.guid}}" />
Эл.почта <input type="text" ng-model='com.mail' /><br />
Текст <input type="text" ng-model='com.text' /><br /><br />
<input type="button" value="Отправить" ng-click='save(com)' />
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question