GithubHelp home page GithubHelp logo

udenis / angular-jl-tether Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jeffling/angular-jl-tether

0.0 2.0 0.0 182 KB

Tether for Angular, so you can use it in directives declaratively

License: MIT License

CSS 1.14% HTML 2.82% CoffeeScript 7.91% JavaScript 88.14%

angular-jl-tether's Introduction

jl-tether (formerly ng-tether)

Tether wrapper for Angular, so you can use it in directives declaratively. Tether is included

Not to be mistaken for a very cool project called angular-tether that is in the process of implementing Tether in angular.

Install

bower install jl-tether or npm install jl-tether

Usage

Include jlTether as an angular module dependency, then

<div jl-tether jl-tether-options="{
    target: '.target',
    attachment: 'top left',
    targetAttachment: 'top right'
}"></div>

or

<div jl-tether 
 jl-tether-target=".target" 
 jl-tether-attachment="top left"
 jl-tether-target-attachment="top right"></div>

You can grab a reference to the Tether object if you want by passing a string into jl-tether.

<div jl-tether="ngTetherReference" 
 jl-tether-target=".target" 
 jl-tether-attachment="top left"
 jl-tether-target-attachment="top right"></div>

ngTetherReference will now be in $scope. You can do things like

<div ng-click="ngTetherReference.destroy()">kind of a button</div>

To destroy it.

You can see the Tether docs for a full list of options and api functions.

Building

npm run deps to get the dependencies
npm run dist to build
npm run watch to continuously build

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.