The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
0answers
27 views

angularjs ng-pattern error message overwrite

I have a ng-pattern on my input field ecName which allows only alpha numeric characters. Ng-pattern works fine but the problem is I am getting two error messages one the default one and one that I ...
3
votes
2answers
209 views

Typescript error Property does not exist on type

I am new to angularjs 2 and ionic 2. I am working with angularjs form with Validators, FormControl and FormGroup. Everything is good when I execute the project using ionic serve --lab. but when I ...
0
votes
1answer
55 views

Angular directive change ngmodel value from null to undefined breaks validation

I have created a plnkr to describe my problem: Link to plnkr Problem description: I have a number field, the value from which is written to the model. First I implemented this feature like the first ...
0
votes
0answers
16 views

has-class not getting applied through ng-repeat form validation : angularjs

<div class="col-md-12" data-ng-repeat="p in ['A1','A2','A3']"> <div class="form-group col-md-6" data-ng-class='{ "has-focus": form.model[p].hasFocus, "has-success": form....
1
vote
0answers
24 views

Angular and posting Data to a Form

I am new to programing overall and this is my first try at using Angular so please take that into consideration when you answer. It was suggested that I attempt to build a To Do list using Angular to ...
0
votes
2answers
20 views

Unable to provide default textfield value in angularjs

I'm not able to pass a default to textfield in an angularjs array <input type="hidden" class="form-control" name="rname" ng-model="userInfo.rname" ng-init="userInfo.rname='{{ r.Name }}'"> The ...
0
votes
1answer
20 views

$error.required message is not getting reset on reset button : AngularJs

<div class="form-group"> <input type="text" name="Name" data-ng-model="panNumber" required> <p data-ng-show="loginForm.Name.$error.required && (loginForm.Name.$touched ...
1
vote
0answers
22 views

Best way for a form controller to expose parsed data from the form it manages?

I come from a Java background and am getting up to speed on Angular 1.5.8+typescript. I have a form controller that crunches the raw fields from a form and produces a data structure. An example of ...
0
votes
1answer
32 views

Referencing Angular form with 1.5

I have an angular directive (1.4) I'm switching over to the component syntax (1.5). The existing code calls the form.$setPristine() if a form reset button is clicked. When I switch it to a component ...
0
votes
2answers
62 views

Why can`t i use $scope.feedback.myChannel inside my controller if i can use it in my html page?

I have a form using angularJs, all code is available on my plunker at the end of the question. inside my controller i have $scope.showTelfield= false; $scope.showEmailfield= false; in my form and ...
1
vote
1answer
26 views

Can't enter invalid view value when using ng-model-optios getterSetter

If I am using ng-model-option's getterSetter with form validation then I cannot enter anything invalid into an input. e.g. HTML <input type="number" ng-model-options="{getterSetter: true}" ng-...
0
votes
1answer
43 views

Angular Form Validation On Dynamically Added And Removed Form Fields In Angular 1.5.7

So I have read a few posts on this topic and haven't quite figured it out. I tried to implement the solution found at https://scotch.io/tutorials/building-dynamic-angular-forms-with-ngrepeat-and-...
0
votes
1answer
34 views

Clear an Angular form upon Submission

I'm trying to clear the form, but keep facing some issues. How can I clear the form on a submit? HTML <form id="contact" class="contact-form" ng-submit="sendMail()" novalidate ng-controller="...
2
votes
1answer
73 views

ng-minlength Angular Form Validation

Angular seems to not be raising minLength or maxLength error in the below code... the required error (as well as the email error) is working however. I know ng-minlength and ng-maxlength is working ...
0
votes
2answers
22 views

Is it valid to have form name “<controller_as_identifier><dot><namespaced_form_name>”

So, the code like this: <form ng-controller="MyCtrl as myCtrl" name="myCtrl.form"> <button type="button" ng-click="myCtrl.logScope()" >log scope</button&...
1
vote
4answers
55 views

How to validate forms in Angular JS

i'm a newbie in angular JS. and i was trying the input type="text", i'm retrieving my name from my controller and i was using $dirty and $invalid to validate my data but it isn't showing when i make ...
1
vote
1answer
168 views

AngularJS custom form controls validation

I'm having issues with validating custom form controls in AngularJS. The two issues are: I want to trigger a custom error when the placeholder/initial text has not been modified within the content ...
0
votes
0answers
98 views

Unable to disable a button when the form is invalid with an angular custom isolated directive with a form

The intent with the below approach was to create a custom authentication form with the ability for the user to change the display of the custom elements if he wanted to. I have two directives parent &...
0
votes
0answers
31 views

Transcluded directive: access to corresponding ngModelController in formController

Ok, my situation is perhaps a bit more complex, so let me explain... I have a form and a directive form-input, which wraps around some "control", e.g. input element, and adds additional functionality, ...
0
votes
1answer
183 views

angular checkbox form with ng-repeat can only select one option

I am trying to create a multistep form and step 2 is a bunch of checkboxes. Here is the form with checkboxes: <form ng-submit="createSubCategory(formData)"> <div ng-repeat="sub_category ...
0
votes
2answers
469 views

Disable ui bootstrap datepicker if the date is less than the current date - Angularjs ngRepeat

How can I disable each individual datepicker if the date model is less than the current date or if the date has "expired". I am developing a UI with datepickers for start and end dates. Initially, ...
0
votes
0answers
90 views

Access controller and form names in angular directive

I'm not sure if this is the right approach. I have multiple forms with different controllers and i have one custom directive used by all forms. When user clicks RESET button from either of the form. ...
-1
votes
1answer
69 views

How to perform dropdown control validation with angular js validator?

I am doing angular js dropdown validation but getting problem when doing dropdown validation. I have taken everything from this website and using this code: https://github.com/turinggroup/angular-...
1
vote
1answer
1k views

Angular ng-required not working with custom directive

I am using Angularjs version 1.5 to validate the inputs in my form. ng-required is used to validate the all input required However, its not working with a custom directive which renders a combo. ...
1
vote
1answer
209 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
95 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
35 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
51 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
80 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
84 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
33 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
423 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
172 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 class="form-...
0
votes
2answers
151 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> <td>...
4
votes
1answer
891 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 ...
1
vote
3answers
1k 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
527 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 ...
-1
votes
1answer
377 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
40 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 ...
2
votes
0answers
197 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
302 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. ...
0
votes
1answer
895 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 ...
1
vote
3answers
456 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 type="...
-1
votes
1answer
179 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 ...
3
votes
2answers
292 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
58 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)" ng-init="...
1
vote
2answers
3k 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> ...
2
votes
1answer
1k 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 ...
0
votes
1answer
393 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 ...
1
vote
1answer
679 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" ng-model="ctrl.user....