Giter VIP home page Giter VIP logo

angular-float-labels's Introduction

angular-float-labels

AngularJS implementation of float labels

Installation

Bower:

bower install angular-float-labels --save

Usage

app.js:

angular.module('myAwesomeApp', ['angular-float-labels'])

form.html

<input type="text" placeholder="Enter some text"/>
<input type="email" placeholder="Enter your email"/>

Customize

Attribute

If you do not want to the logic to trigger from the placeholder attribute, please include angular-float-labels.custom.js instead of angular-float-labels.js and configure the provider appropriately:

.config(function(floatLabelProvider) {
		floatLabelProvider.setAttributeName('floatLabel');
})

CSS

Override CSS classes defined within angular-float-labels.css or simply do not include it and create them all yourself.

Example

Please view the demo

Minification

If you're using the Rails assets pipeline or UglifyJS, be sure to use v0.1.1 (or later), which includes annotation for the $parse dependency. For concatenated + minified Javascript with Angular >1.3, you can force function annotation checking with:

<!-- auto bootstrapping -->
<div ng-app="myApp" ng-strict-di>

or

// manual bootstrapping
angular.bootstrap(document.body, ['myApp'], { strictDi: true});

Release Notes

  • v0.1.1 - Fix minification issues and auto-wrap input element
  • v0.1.0 - Add support for a custom attribute instead of placeholder
  • v0.0.7 - Fix validity check
  • v0.0.6 - see v0.0.5
  • v0.0.5 - Deprecated ngModel requirement and removed unnecessary lodash/underscore dependency
  • v0.0.4 - Fixing issue #1 and #2
  • v0.0.3 - Adding main files to bower.json
  • v0.0.2 - Fixing dependency versions
  • v0.0.1 - Basic input support

angular-float-labels's People

Contributors

chrisronline avatar ditsara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

angular-float-labels's Issues

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.