Git Product home page Git Product logo

Comments (3)

lukemelia avatar lukemelia commented on May 24, 2024

@dmagunov I updated the master branch to ember 1.12.1 and deployed the result to our demo page: http://yapplabs.github.io/ember-modal-dialog/ As you can see, there is an working example of using a custom subclass.

Take a look at the "dummy" app in the source code and see if you can tell what you're doing something differently.

from ember-modal-dialog.

dmagunov avatar dmagunov commented on May 24, 2024

Hello,

I've use Your example from readme.md

application.hbs

{{#aww-modal-dialog close="toggleModal"  alignment="center"  translucentOverlay=true}}
    Oh hai there!
{{/aww-modal-dialog}}
`import Ember from 'ember'`
`import ModalDialog from 'ember-modal-dialog/components/modal-dialog'`

AwwModalDialogComponent = ModalDialog.extend

    setup:(->
        Ember.$('body').on 'keyup.modal-dialog', (e) => 

            if e.keyCode == 27
                @sendAction('close')

    ).on('didInsertElement')

    teardown: (->
        Ember.$('body').off('keyup.modal-dialog')
    ).on('willDestroyElement')

`export default AwwModalDialogComponent`

screenshot
screen shot 2015-06-08 at 2 11 14 pm 3

Ember 1.12.1
Ember Data 1.0.0-beta.19

If I use modal-dialog component - all working good.

from ember-modal-dialog.

lukemelia avatar lukemelia commented on May 24, 2024

@dmagunov you would need to inject the destinationElementId into your subclass. The subclass example in the dummy app does this here: https://github.com/yapplabs/ember-modal-dialog/blob/master/tests/dummy/app/initializers/register-subclassed-modals.js

from ember-modal-dialog.

Related Issues (20)

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.