JavaScript Edu Resources. Angular Courses. React Tutorials. Join us!

angular2-promise-buttons

Loading buttons for Angular 2 by @johannesjo

  • x version go is a simple module that let’s you add a loading indicator to a button of your choice.
  • And add it as a dependency to your main module

    Using the buttons is easy.

  • There is the class on the button, which is set, when the promise is pending and there is the element inside the button.
  • Configuration is done via the forRoot method of the promise button module:

    { } ; @ ({ imports: [ .

  • ({ your custom config goes here spinnerTpl: , disableBtn: , the class used to indicate a pending promise btnLoadingClass: , only disable and show is-loading class for clicked button, even when they share the same promise handleCurrentBtnOnly: , }), ], }) { }



GitHub

Comments are closed, but trackbacks and pingbacks are open.