Code Monkey home page Code Monkey logo

angular-form-state's Introduction

bendrucker

Ben Drucker's contact information

Install

$ npm install --save bendrucker

Usage

var bendrucker = require('bendrucker')

console.log(bendrucker)
//=> {name: 'Ben Drucker' ...}

License

MIT © Ben Drucker

angular-form-state's People

Contributors

bendrucker avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

maaikeb

angular-form-state's Issues

custom ng-disabled doesn't work on submit-button directive

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?

model binding is not working on submit-button

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)) }

Module 'angular-form-state' is not available!

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

submitting throws exception when pending attrebute is not set

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.