x-editable trigger in angularjs controller - angularjs

Frankly i need an auto focus next field in angularjs xeditable form. It's also available in jQuery xeditable form Exactly like this
Thanks in advance.

Related

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 our stack.
We need get call to web server (to fetch files. Ex: images).
But I am wondering, will we ever need a post operation into webserver in our case?
Also, do we ever need a form,ng-form,submit,ng-submit - in our case?
Any help would be apprecicated, Thanks!
There are number of reasons outside of just submitting to use a <form> tag in your code. For one, angular wires up validation results right into the form object. If you didn't have the form, you wouldn't get that functionality.
I'd suggest taking a look at the example at the bottom of the Angular Form documentation to see why you may want to use the Form. You can see how the form.$valid and form.$error change if you clear out the textbox in the example.
https://docs.angularjs.org/api/ng/directive/form
Regarding submitting, ngSubmit will prevent the default action of a form which is usually posting the server. Similar to the validation properties that exist, there is also a form.$submitted property that will be updated to true when the form is submitted with an ng-submit. This will not happen on an ng-click.
https://docs.angularjs.org/api/ng/directive/ngSubmit
Not much different,but ng-submit would be prevent by input[required] etc. ng-click is unlimited

parsley.js with AngularJS for form validation

I'm developing application using AngularJS (using requireJS). I want to validate input fields (basically all client side validation). I thought to use Parsley.js which looks great but it doesn't work with AngularJS. HTML5 validation overrides parsley validation.
So my questions are
1) Any idea why parsley is not working with my angular app?
2) Which is best validator for angular (except angular default validation)?
I am looking into this as well. Seems that someone on SO has created a directive to make Parsley work with Angular. Click.
The best validator, as of yet, to me seems to be the built-in Angular validation. Though multi-field validation is still a pickle.
Try this
<form role="form"
ng-submit="submit(this.form, reg)"
novalidate="novalidate" ...
to prevent native browser validation

Are there any angularjs directives for validating forms not using ng-model?

The forms I am working with are not my own and therefore do not have ng-model on the inputs. Is there a way or a directive that you would recommend that can provide basic validation(required,url,email) similar to the ng-model validation?
I know I can use jquery/pure js just wondering if there's an easy way with NG.
Thanks in advance for any advice!

Loading angularjs controller dynamically

I have a form and on button click partial cshtml is loaded dynamically.I want to add Angularjs validations for the dynamic content but the dynamic content is loaded out of angular scope and none of the angular properties are working with it...So how can i bind the dynamic content with the existing form that has the angular properties.
Please help me with some suggestions...
If I understand you correctly: Make sure the dynamic content is loaded inside the domain of the controller doing validation (eg on form fields inside the controller's div), and run $scope.$apply() after the content loads into this context. Assuming your validation procedure is complete this should re-run validation.

Form Validation: AngularJS vs Jquery Validate

I am using angular js for building a form.
Whats the best way to validate my form in a similar way to JQuery validate including custom rules?
Thank you!
With ngForm directive you have an instance of FormController with access to its methode $setValidity() which sets the validity state of a control. You may use it with $parsers in your directive.

Resources