1.0.1 • Published 7 years ago

angular-ai-ui v1.0.1

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
7 years ago

Angular Ai Ui

Add UI component for you application

npm install angular-ai-ui

or

yarn install angular-ai-ui

How to use

Need require file ai-ui.js

var myApp = angular.module('myApp', ['ai.ui']);

Use Form

<ai-form id="login" method="post" action="you/url" enctype="multipart/form-data">
    <!-- html tags -->
</ai-form>

Will be replaced by

<form class="ai-from" id="login" method="post" action="you/url" enctype="multipart/form-data">
    <!-- html tags -->
</form>

Use Field

Use text field

<ai-text id="id_field" label="Text to label" name="input_name" required ng-model="scope.name"></ai-text> 

Will be replaced by

<div class="ai-form-group">
    <input type="text" id="id_field" class="ai-text" ng-model="ngModel" name="input_name" required="required"/>
    <label class="ai-label-text" for="id_field">Text to label</label>
</div>

Use password field

<ai-password id="id_field" label="Text to label" name="input_name" required ng-model="scope.pass"></ai-password> 

Will be replaced by

<div class="ai-form-group">
    <input type="password" id="id_field" class="ai-password" ng-model="ngModel" name="input_name" required="required"/>
    <label class="ai-label-password">Text to label</label>
</div>

Use file field

<ai-file id="id_field" label="Text to label" name="input_name" accept="jpg" multiple required ng-model="scope.files"></ai-file>

Will be replaced by

<div class="ai-form-group">
    <input type="file" id="id_field" class="ai-file" ng-model="ngModel" name="input_name" accept="jpg" multiple required="required" />
    <label class="ai-label-file">Text to label</label>
    <div class="ai-file-upload">{{ 'No file selected' | translate }}</div>
    <button class="btn btn-danger">{{ 'Clear' | translate }}</button>
    <button class="btn btn-primary">{{ 'View' | translate }}</button>
</div>

Use checkbox field

<ai-checkbox id="id_field" label="Text to label" name="input_name"></ai-checkbox>
1.0.1

7 years ago

1.0.0

7 years ago