Ben Drucker's contact information
$ npm install --save bendrucker
var bendrucker = require('bendrucker')
console.log(bendrucker)
//=> {name: 'Ben Drucker' ...}
MIT © Ben Drucker
Smarter AngularJS forms for reacting to submission states
License: MIT License
Ben Drucker's contact information
$ npm install --save bendrucker
var bendrucker = require('bendrucker')
console.log(bendrucker)
//=> {name: 'Ben Drucker' ...}
MIT © Ben Drucker
Hey,
So it turns out, that using ng-disabled doesn't work on the submit-button directive
We have code like so:
<button type="submit" class="btn btn-primary" tabindex="0" ng-class="{ 'btn-locked' : ClearCtrl.bank_form.$invalid }" submit-button ng-disabled="ClearCtrl.bank_form.$invalid" pending="Submitting...">Continue to clear</button>
And when the form returns from ajax with an error, the button stops being "pending" and removes the disabled state, and then the ng-disabled doesn't work anymore.
Any way around this?
I have a submit button with text that is bind to my model:
<button submit-button>{{ MyCtrl.myChangingText }}</button>
Even before the button is clicked (and the state changes to pending), the text doesn't change with the model.
It seems this is due to line 97 of the release file:
element.text($interpolate(pending && pendingText != null ? pendingText : original)(scope))
Might the solution be to invoke the $interpolate only if pending is true?
if (pending && pendingText != null) { element.text($interpolate(pendingText)(scope)) }
Ola!
I'm having some difficulty getting this plugin working?
When I include the 'angular-form-state' in my app init I get the title error message,while if I include 'bd.form-state' which looks like release/angular-form-state.js is exporting as, my app initializes fine.
Is the README.MD wrong or am I only pulling part of the library into my app..?
Lewis
I use the submit-button
directive in order to get the button disabled. I use my own animation for the button submit state, and don't set the 'pending' attrebute.
when the form state is changed to pending, the function $interpulate :
element.text($interpolate(pending ? attributes.pending : original)(scope));
throws TypeError: Cannot read property 'length' of undefined
since attributes.pending
is undefined.
maybe add a check whether it is set ? like this:
element.text($interpolate(pending && attributes.pending ? attributes.pending : original)(scope));
thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.