Giter Site home page Giter Site logo

ashgadala / ng-inline-edit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tameraydin/ng-inline-edit

0.0 2.0 0.0 1.64 MB

Simple inline editing for HTML elements

Home Page: http://tamerayd.in/ng-inline-edit/

CSS 8.09% HTML 26.05% JavaScript 65.86%

ng-inline-edit's Introduction

ng-inline-edit Build Status Code Climate Coverage Status

Demo

Usage

Install ng-inline-edit via Bower:

bower install ng-inline-edit --production

Include main files:

<link rel="stylesheet" href="bower_components/ng-inline-edit/dist/ng-inline-edit.min.css">
<script src="bower_components/ng-inline-edit/dist/ng-inline-edit.min.js"></script>

Include angularInlineEdit module as a dependency into your app:

angular
  .module('yourApp', [
    'angularInlineEdit'
  ]);

Pass your model to inline-edit attribute on your HTML element and provide a callback function to listen changes:

<span inline-edit="yourModel"></span>
<!-- with optional attributes:
  inline-edit-callback="yourListener(newValue)"
  inline-edit-validation="yourValidator(enteredValue)"
  inline-edit-placeholder="Type a value..."
  inline-edit-filter="currency"
  inline-edit-btn-edit="Click to edit"
  inline-edit-btn-save="Save me"
  inline-edit-btn-cancel="Nevermind"
  inline-edit-on-blur="cancel" // 'cancel' or 'save'
  inline-edit-on-click
  inline-edit-textarea // uses <textarea> instead <input> & disables Enter key submit
-->

Development

See the instructions at ng-pack.

License

MIT http://tameraydin.mit-license.org/

ng-inline-edit's People

Contributors

magbeat avatar mikedobrin avatar peterjurkovic avatar tameraydin avatar

Watchers

 avatar  avatar

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.