The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
1answer
18 views

Angularjs directive to make form dirty without ng-model

I am using Angular 1.5.1. I have a checkbox on my form. I do not care about the truth/false indicator of the checkbox being checked/unchecked and so I do not want ng-model on it. What I care for is: ...
0
votes
1answer
19 views

How to access a form in a modal from a controller

In my controller.js file I have: angular.module('App').controller('AppCtrl', AppCtrl); function AddApp(){ var vm = this; vm.resetForm = resetForm; function ...
0
votes
0answers
18 views

custom validation in angularjs forms

While working with forms in Angularjs I need to add the validation rules based on some conditions. Lets say based on a ng-model value of one attribute I need to decide if the text box is mandatory or ...
0
votes
0answers
11 views

Validating form in Angularjs with optional conditions

I have a select box in which I have two options Enable and Disable. There are two datepicker objects, one for enable time and another for disable. If I select the Enable from the dropdown, Enable ...
0
votes
0answers
26 views

angularjs form validation for file input

I am using Angularjs form validation. I have a textfield and file upload filed. Currently I have handled the validation for either one of them should be present. But there are few additional rules ...
0
votes
0answers
48 views

controller is undefined in angular directive

I need to have a custom validation for the date field in my Angular form text field. I am using the angular-ui datepicker element for the display. For the validation I have create my custom directive ...
0
votes
2answers
24 views

clearing angularJs form

I am using AngularJs 1.4 and having a input form. I have a reset, cancel and submit button at the end of the form. When I click, all the form elements must be set to default values. But the submitForm ...
0
votes
1answer
135 views

ng-required not working when submitting a form

I have the following code in an input text box with the required attribute, but when I tab off of the field or submit the form, it doesn't stop the form from submitting and informing the user the ...
2
votes
2answers
3k views

Using $setValidity on an element outside of the current scope

I have a global directive, that is in charge of getting the error message from the controller, compiling, and displaying it. In case there is a server validation error such as This email already ...
0
votes
1answer
70 views

AnglarJS Form is not working, $scope.submit. undefined error

I have simple angularJS app, which got module, controller, service and directive; along with template html page which holds form variable and structure and print inside main html page index.page using ...
0
votes
0answers
30 views

Why file dialog opens in my Angular JS form after press enter in a text field?

I have a form and a ng file upload control in that form: <form name="form" class="form-horizontal" novalidate ng-submit="save(entity)"> <div class="form-body"> <h3 ...
0
votes
2answers
54 views

Triggering angular form validation from a click handler

I have a form that was moved into a table, losing the built in form validation features as I cannot use ng-submit: <tr ng-form="controller.add.form"> <td>New item</td> ...
1
vote
1answer
49 views

Angular form not working in a table

I created a working form placed in a div below a table; <div class="row"> <form class="form-signin" ng-submit="controller.add.save()"> <h2 class="form-signin-heading">Add an ...
0
votes
3answers
57 views

`ng-pattern` - how to check for only numbers?

I am using an ng-pattern to check for ONLY numbers in my input. But for me that's not working. I can able to type in characters after the number. How can I restrict that? here is my code : <div ...
1
vote
0answers
66 views

How to validate angular form in controller

How can I validate my angular form in controller? I need to check form and depends on validity show block of text I've used an example of form from official angularjs website. And can somebody ...
0
votes
1answer
66 views

Pass $dirty flag from child form in directive to parent form

I am new to angular JS. I have main form it has text box and one directive which has checkboxes. If user addded some text to textbox or modify inital status of checkboxes, when user click on ok button ...
2
votes
1answer
26 views

AngularJS with filemanager breaks scope on formfield?

I'm trying to use a file manager to insert an image link in a formfield, but the data do not submit to the scope of the controller. When I set a default value, this value is unchanged. This is the ...
56
votes
7answers
54k views

Can I access a form in the controller?

I'm currently using the following. $scope.$$childHead.customerForm[firstName], so that: <form name="customerForm"> <input type="text" name="firstName" ...
1
vote
0answers
90 views

form not submited properly in angularjs with struts2

I am using struts2 framework with angularjs.There are two buttons one for reset the texts fields with default value and other is to submit the page. my submit is not working. My jsp page is:- ...
2
votes
1answer
115 views

How to cancel/ignore AngularJS asynchronous validation check before resolution?

I have a simple HTML5 user registration form. The value of the username input is validated to ensure that there are no users with the same username using a custom function added to $asyncValidators. ...
1
vote
1answer
225 views

AngularJS - submit empty form fields as null rather than completely omitting it

This is my HTML / Angular: <form ng-submit="ctrl.add()"> <div class="form-group"> <label>Username</label> <input type="text" ...
0
votes
1answer
244 views

Ionic: Accessing from object in controller of the custom modal form

I've created a codepen to show the problem. When the service appModalService is used, the vm object is directly replaced with the FormController object, so none of the attributes of vm is accessible ...
3
votes
1answer
890 views

Angular form is $valid when all inputs are blank, why?

My form is showing up as valid even though all of my input fields are blank. I have the required keyword in the input fields. <!DOCTYPE html> <html ng-app="myApp"> <head> ...
0
votes
0answers
31 views

How to link items from different collections together?

I'm making a blog-chat app using meteor with angularJS and ionic. So I have two collections, chats and messages. I want when the user taps an exciting chat to be able to add messages. I also want a ...
1
vote
3answers
112 views

Simple submit form using Angular

I'm new to Angular, but very old with google. I cannot find out how to submit this form using Angular, like how we do in jQuery. <form> <input type="text" /> <button ...
-1
votes
1answer
59 views

AngularJS: Editing a form values not coming in scope

I am using a form to create an user in my application. I am also using the same form to update the user profile and I am loading the values from database. if user does not change anything in the edit ...
2
votes
1answer
84 views

Prevent async unique validator to validate same value only when editing?

I've got an AngularJS form that has a custom validator to check with the server backend whether the input value is unique or not. The unique validation is done by the mob-async-validate-unique ...
0
votes
1answer
39 views

Angular Pass String to Function

This seems like it should be easy to do, but I am not sure why this isn't working. All I want to do is pass this string to the function. I've tried this. <form ng-submit="edit(type)" ...
1
vote
1answer
3k views

Submitting a Form with Angular JS and Spring MVC

I am noob with Angular JS and I am having difficulties to submit a simple Form using Angular JS and Spring MVC. I am getting this error: The requested resource is not available mock.jsp ...
1
vote
2answers
497 views

angular- bind form submit with multiple buttons

I have a form with multiple submit buttons: <form name="myForm" customSubmit> <input type="text" ng-minlength="2"> <button type="submit" ng-click="foo1()"></button> ...
0
votes
1answer
42 views

Angular forms: Triggering revalidation of field

I have a form with two fields: validFrom and validUntil. ValidUntil has a custom validator that will render the field invalid if the value is before the value in validFrom. This works fine as long as ...
0
votes
2answers
189 views

Use ngModel on a custom directive with an embedded form, with working validation?

I have a commonly reused set of form inputs that are reused throughout my application, so I am trying to encapsulate them in a custom directive. I want to set an ngModel on my directive and have that ...
1
vote
3answers
68 views

AngularJS nested froms, submit button not working

I have an outer form that once submitted will, send the user to the next step. The inner form is submitting search requests for a table that is nested in the outer form. At the moment my solution is ...
1
vote
1answer
303 views

How to cancel debounce in ng-model-options in AngularJS

<form name="editForm"> Title<input ng-model="task.title" type="text" name=taskTitle ng-model-options="{ updateOn: 'default' ,debounce{'default':2000000} }"> <a ...
2
votes
1answer
102 views

login page redirect in angular validatioon

var app = angular.module('myApp', ['ngRoute']); app.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/success', { templateUrl: 'success.html', controller: ...
1
vote
1answer
176 views

how to hide value of input element if its $pristine

I have ng-model attached to , but i want to display a default placeholder value if it's not been touched ($pristine). Is there any good way to do it? I cannot simply set my ng-model value to null ...
0
votes
0answers
27 views

how to handle a filtered value in input with AngularJS

In AngularJS, which is the best way to handle a filtered value in an input? Our user should input a number and see it localized, but you cannot bind an input to a model and format it with a filter. ...
1
vote
1answer
281 views

ng-required not working as expected if parent div is hidden conditionally

In my code I am using ng-show and ng-required in combination. But, ng-required is not working as expected even when the respective $scope variable value is set to false. Please find the code below ...
0
votes
1answer
29 views

how to concatinate a string to a $scope model in angularjs?

How can I concatenate a variable to the $scope model. I am trying to do something like this for(var i=0;i<=response.length-1;i++) { $scope.formData.jobId+i=response[i].jobId; } How can I ...
1
vote
3answers
4k views

AngularJS - Prevent submission of a form if it is invalid

I have created an isolated case of my issue: http://plnkr.co/edit/6LXW5TG76LC9LNSrdpQC Here is the code of the isolated case: <!DOCTYPE html> <html ng-app="App"> ...
1
vote
1answer
58 views

Angularjs validation issue for password field

Here is my angularjs code for the password field : <input type="password" class="form-control" name="password" ng-model="signup.registerPassword" ng-minlength="8" > <small ...
0
votes
1answer
183 views

Validate field count in angular form

I have a form where a model contains an array of sub-models, like this: <form name="form1"> <div ng-repeat="sub in model.submodels"> <input ng-model="sub.name" required> ...
0
votes
0answers
192 views

AngularJS disable form validation while keeping the built-in browser (HTML5) validation

I'm using angularJS form which has three inputs - text, email and multiple email field. All the above fields are required, and Angular's validation works fine on the text and email fields, but it is ...
2
votes
1answer
1k views

ng-pattern doesn't show $error.pattern

I have script here and ng-pattern works correctly because scope.subnet is shown in Output only after input matches pattern. But ng-show doesn't display any error if ng-pattern is not matched <body ...
0
votes
2answers
699 views

Angular validators and ng-maxlength use

I've got the following div, which I want to add the bootstrap's class "has-error" if the input length is over 50 characters. This is the HTML: <div class="form-group" ...
2
votes
2answers
204 views

Do not trigger form.$invalid on first load

Having such form <div ng-controller="FormController as f_ctrl"> <form ng-submit="f_ctrl.submit()" name="myForm"> <input type="text" ng-model="f_ctrl.user.username" ...
1
vote
3answers
113 views

Angular JS Form validation not working

I am trying to do a simple form validation using angular js. But it doesnt seems to work and I am not getting what I am missing. HTML <form role="form" class="ng-pristine ng-valid" ...
0
votes
1answer
280 views

Angular dynamic ng-model name

<div class="pw-form-control-text" id="disclosureQuestionsPrepopulate" name="disclosureQuestionsPrepopulate" ng-repeat="type in ...
2
votes
1answer
186 views

How to use submit button to search the record in a table?

Here is my index.html page ------index.html------- <!DOCTYPE html> <html> <head> <script data-require="[email protected]" ...
0
votes
2answers
50 views

Angular Checkboxes not Binding Properly

Having trouble figuring out this problem involving an Angular checkbox form generated from an API. I can create a checkboxes but two problems: The checkedness of the boxes does not match the values ...