Solved: involved jquery-ujv via Bower, added data-remote=true attribute to the <form> tag
среда, 22 апреля 2015 г., 12:19:37 UTC+7 пользователь Funny Cherry написал: > > Hi. > I have a form kind of: > > <div class="input"> >> <div id="chat" data-channel="/messages" >> data-recipient-id="3"></div> >> <form class="new_message ng-pristine ng-valid" ng-action=" >> http://localhost:3000/api/v1/messages" name="NewMessageForm" >> ng-submit="submit()" novalidate ng-controller="MessagesController as >> MsgCtrl" id="new_message" accept-charset="UTF-8" data-remote="true"><input >> name="utf8" type="hidden" value="✓"> >> <textarea name="new_message_text" id="message_text" >> ng-model="NewMessageFormData.text"></textarea> >> <input type="hidden" >> ng-init="NewMessageFormData.recepientId = 3" >> ng-model="NewMessageFormData.recepientId"> >> </form> >> </div> > > > After I submit this form and after submit() function finish work, I get > page reload. > How to prevent it? > > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
