ng-tether

0.1.0 • Public • Published

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 ng-tether or npm install ng-tether

Usage

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

or

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

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

<div ng-tether="ngTetherReference" 
 ng-tether-target=".target" 
 ng-tether-attachment="top left"
 ng-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

I've never been to the Empire State building

Readme

Keywords

none

Package Sidebar

Install

npm i ng-tether

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • jeffling