Giter Club home page Giter Club logo

angular.jquery's Introduction

angular.jquery

Angular directives for jQuery and jQuery UI plugins

jqdialog - jQuery UI Dialog Directive

Creates a jQuery UI dialog using the supplied options. A services will be created for the dialog named dialogNameDialogService with openDialog and closeDialog methods.

Attributes:

  • dialog-name (required): name used for the dialog service
  • on-open: a scope function called when the dialog is opened
  • on-close: a scope function called when the dialog is closed
  • button-classes: map of {'button name': 'class name'} for any buttons
  • args-to-scope: true = openDialog arguments will be added to the directive's parent scope
  • all jQuery UI dialog options will be available as scope attributes
    • buttons: you can pass 'close' as the method for a button and it will close the dialog

Service methods:

  • isOpen: calls isOpen method on the dialog
  • moveToTop: calls moveToTop method on the dialog
  • getOption(option): returns the value of the option
  • setOption(option, value): sets the option to the new value
  • openDialog(options): calls onOpen if available, then opens the dialog and returns a Promise
  • closeDialog(data): close the dialog and resolves the Promise with the data

AngularJS 1.3 Note

The first example had the dialog controller declared on the directive itself. In Angular 1.3, this will cause the following error:

Error: error:multidir Multiple Directive Resource Contention

To work around this, you will need to create a separate div around the jqdialog declaration. The example has been updated to match this.

Dialog Demo

angular.jquery's People

Contributors

jurberg 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.