|
|
5 سال پیش | |
|---|---|---|
| .. | ||
| dist | 5 سال پیش | |
| .bower.json | 5 سال پیش | |
| LICENSE | 5 سال پیش | |
| README.md | 5 سال پیش | |
| bower.json | 5 سال پیش | |
This directive allows to disable a given element and all buttons, inputs and other form controls will be disabled.
Open samples/index.html to see the example how to use this directive.
Installation
Run bower install angular-disable-all --save
Include bower_components/angular-disable-all/dist/angular-disable-all.js in your index.html file
Add a new dependency in your module
angular.module('yourApp', ['disableAll', ...])
How to use it
Lets say you have a div with a form and inputs and buttons inside:
<div disable-all="true">
<form>
<input name="name" type="text">
<button>submit</button>
</form>
<!-- This will not be disabled -->
<a href="http://google.com" do-not-disable>google</a>
</div>
You can specify boolean variable to disable-all, directive will watch it and disable / enable div when variable changes.
<div disable-all="isDisabled">
<form>
<input name="name" type="text">
<button>submit</button>
</form>
</div>
TODO-s (for contributors):