The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
0answers
15 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
16 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
1answer
19 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 ...
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 ...
1
vote
3answers
267 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
2answers
607 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 ng-click="...
3
votes
3answers
1k 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
0answers
21 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 ...
1
vote
1answer
849 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. ...
0
votes
2answers
54 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 ...
0
votes
1answer
27 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 ...
1
vote
1answer
21 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
41 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-...
1
vote
4answers
50 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 ...
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
54 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 ...
85
votes
7answers
84k 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" ng-model="data.customer....
0
votes
2answers
17 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
1answer
134 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
71 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
29 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
154 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
312 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
79 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. ...
6
votes
1answer
6k 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 ...
-1
votes
1answer
59 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
150 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
75 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
42 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
70 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
81 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 ...
1
vote
1answer
792 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
4k 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
319 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
125 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
128 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>...
3
votes
1answer
466 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
0answers
207 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
311 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
35 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
168 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
280 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
582 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....
0
votes
1answer
755 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 ...
4
votes
1answer
2k 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
37 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
320 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
145 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 ...