Questions tagged [ng-submit]

AngularJS directive in module ng

Enables binding angular expressions to onsubmit events.

Additionally it prevents the default action (which for form means sending the request to the server and reloading the current page), but only if the form does not contain action, data-action, or x-action attributes.

Link: http://docs.angularjs.org/api/ng/directive/ngSubmit

94 questions
2
votes
2 answers

Forcing ngSubmit in presence of [action] attribute

What Angular says... [ngSubmit] prevents the default action (which for form means sending the request to the server and reloading the current page), but only if the form does not contain action, data-action, or x-action attributes. So if you were…
Pablo Armentano
  • 583
  • 7
  • 13
2
votes
3 answers

Submit form with ng-submit and trigger synchronous post request

I have a form that I want to trigger validation on when the user clicks submit. If the validation fails, then suitable error messages are displayed. This much works. However if the validation passes I want the form to submit a synchronous POST…
Nat
  • 2,689
  • 2
  • 29
  • 35
1
vote
1 answer

Angular, My model are incompatible with my FormGroup. (Type 'number | null | undefined' is not assignable to type 'number')

I'm new in Angular, I made a api POST with a model, but that model isn't compatible with my FormGroup, I don't understand how to set up the formgroup. I guess, I have to put something so that the variables are not null or undefined My…
Mr Usher
  • 21
  • 5
1
vote
1 answer

ngSubmit not executing in Angular Reactive Form

I'm new to angular, and was messing around reactive forms watching a tutorial. My ngSubmit() function is not executing and nothing happens when I click the submit button, spend an hour trying to find the root cause. Can someone help…
AppSensei
  • 8,270
  • 22
  • 71
  • 99
1
vote
0 answers

Angular 5 ngsubmit not working inside modal popup window for add delete

I am creating new angular 2 application in which i have created the one component(html and ts) files respectively. in which i have displayed the list and after list model for editing and adding records. now when I am submiting form only two fields…
1
vote
0 answers

AngularJS Material form validation onSubmit

I have a form that I've coded using AngularJS Material and wanted to add some form validations. The following is a snippet of my code:
Dave
  • 1,257
  • 2
  • 27
  • 58
1
vote
1 answer

Textarea with ng-model is not submitting when using wysiwyg

I tried to make a form using ng-submit. In the form there's a textarea that call wysiwyg (it's trumbowyg). When submit it, all form data are submitted but that textarea.
Abaij
  • 853
  • 2
  • 18
  • 34
1
vote
1 answer

Submit array data with ng-submit get error Cannot read property 'name' of undefined

I want to submit a form with array data
{{item.name}}
Abaij
  • 853
  • 2
  • 18
  • 34
1
vote
2 answers

Angular validation error

i have two form of signup and login with code written under single controller with two function called on submit the first form work correctly but the signup always show errors preview here in https://plnkr.co/edit/RS2LVc?p=preview var app =…
Anis
  • 1,190
  • 2
  • 13
  • 26
1
vote
1 answer

angular 2 - ngForm.value does not have ngControl members

I have the following form : import { Component } from '@angular/core' @Component({ selector: 'form1', template: `
theGhostN
  • 342
  • 7
  • 20
1
vote
1 answer

AngularJS ng-submit function is not working in ASP.NET Core 1.0

I have ASP.NET MVC application and I am trying simple example where submit form is handle by ng-submit and alert value of input using angularJS. my first part of angularJS (display record in table ng-repeat) is working but not form What I want is…
K.Z
  • 5,201
  • 25
  • 104
  • 240
1
vote
1 answer

popover doesn't work in a modal-ionic

my modal:
Joe Sleiman
  • 2,416
  • 5
  • 25
  • 40
1
vote
2 answers

Why do we use form or ng-submit in angularjs?

I am planning to have an angularjs application. We will be doing the CRUD operation using Web Api service. And these controller functions I can call from ng-click directive (I mean with out a submit) AngularJs <-> WebApi <-> Sql Serevr => This is…
Relativity
  • 6,690
  • 22
  • 78
  • 128
1
vote
2 answers

Proper use of ng-submit

I have a form that submits a location to Google's Geocoder and returns the lat/long and changes the map. If I use ng-click on the icon it doesn't work unless I click on it twice. If I use ng-submit on the form it appends to the url and doesn't…
Alex Marple
  • 2,908
  • 4
  • 17
  • 24
1
vote
1 answer

Pressing Enter doesn't work with AngularJS

I am having a problem with using 'enter button' on the keyboard with an angular js login form. I know this question is asked before but I believe that my problem is a bit different because I tried almost everything written on the stackoverflow…
Mustafa Bereket
  • 129
  • 2
  • 13