The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
32 views

Angular - using radio buttons

I believe I'm following correctly the AngularJS official documentation for radio buttons. So, I created this code: indexSelected={{indexSelected}} <form name="form"> <div class="form-...
0
votes
3answers
30 views

Validating form field in Angular with regEx [duplicate]

I'm following the official angular documentation , but it's not working for me. What could be wrong ? I need to validate if the mobile phone are required and following the international standard like +...
1
vote
2answers
77 views

How to get file content and other details in AngularJS

How can I get file content while I click on submit button. I'm getting only first and second input. Please refer to snippet: !DOCTYPE html> <html lang="en"> <script src="https://ajax....
0
votes
1answer
24 views

How to include input fields from custom directives in angular forms?

I need to create a simple form with validations like this - https://jsfiddle.net/rohansh20/k7omkz7p/2/ <div ng-app="module1" ng-controller="ctrl1 as vm"> <form novalidate name="vm.form1" ...
0
votes
0answers
22 views

$validator ignores $setValidity in Password Form

I have a validator model.$validators.passwordMatch = function (modelValue) { var repeatPasswordIsValid = (/*some test*/); return repeatPasswordIsValid; }; And from another place I test ...
0
votes
4answers
43 views

Why Angular 1 form validation not works without ng-model

I am trying to implement the basic angular form validation. I have implemented the same. But I am curious to know, why it does not works if I am not using ng-model. Link for plunker to show the same ...
0
votes
2answers
32 views

Controller reading component data

My idea is to create a big form from separated components. So this is my main template: <form novalidate> <div class="row"> <user></user> </div> <...
0
votes
0answers
61 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 ...
4
votes
2answers
800 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
76 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
25 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
28 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
23 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
37 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
66 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
32 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
49 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
35 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
2answers
90 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
26 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
61 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
215 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
112 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
35 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
209 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
610 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
97 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
139 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
2k 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
287 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
124 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
98 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
34 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
509 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
217 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
167 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
1k 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
3k 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
837 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
438 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
41 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
228 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
343 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
977 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
701 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
220 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
314 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
65 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="...