Skip to content

Latest commit

 

History

History
50 lines (39 loc) · 1.41 KB

README.md

File metadata and controls

50 lines (39 loc) · 1.41 KB

GitHub version Bower version

Floating Validation and Labels for AngularJS

Description


###This module has two directives

  • floatingValidation
    • which listen for angular validation events and show/hide the floated label
  • floatingLabel
    • which show/hide the placeholder as label when type on

#Installation

##Bower: > bower install angular-floating-labels --save

#Usage

  • import customizable css in your project
<link rel="stylesheet" href="src/ng-floating-labels.css">
  • import script in your page
<script src="src/ngFloatingLabels.js"></script>
  • inject the module dependency
angular.module('yourProject', ['ngFloatingLabels']);
  • include the directive on your input or select element
<input type="text" placeholder="Simple Text" id="simpleText" name="simpleText" ng-model="simpleText" required floating-validation/>

attribute placeholder is REQUIRED

the parent div of the input field must be position:relative (see example for detail)

Example

this software is released under MIT license