Giter VIP home page Giter VIP logo

Comments (4)

skol-pro avatar skol-pro commented on June 9, 2024

Hi jans-y !
Thank you, it really makes me happy people can use and enjoy the plugin I've made with fun ! :-)

There is some conceptual issues regarding life cycle with the plugin (by "issues" I mean "to improve"), and that's my top priority, hope I'm gonna have a time to refactor that this week-end !

Regarding your problem, by module you really mean that you're importing multiple @NgModule in your app, and that some of those modules are them-self importing the plugin, right ?

In that case, that's an excellent question ! But, from my mind, multiple module means multiple instances so it makes sense. Why not just importing the plugin in your main module (main app), and use a service or something to decide to display the keyboard if it "exists", otherwise the default keyboard ?

from ion-digit-keyboard-v2.

jans-y avatar jans-y commented on June 9, 2024

Hi,

I am using lazy loading and that means that declaring in the app.module.ts is not enough.

I have solved the issue by creating shared module which exports keyboard module and it works without errors.
shared.module.ts

@NgModule({
  imports: [
    CommonModule,
    IonicModule ],
  declarations: [ IonDigitKeyboard ],
  exports: [ IonDigitKeyboard ] //CommonModule
})
export class SharedModule { }

I don't know if it is correct solution but it works.

Only problem that I am experiencing is the issue where clicking button on the another page triggers undefined even after page before was unloaded and keyboard destroyed by your method.

from ion-digit-keyboard-v2.

skol-pro avatar skol-pro commented on June 9, 2024

from ion-digit-keyboard-v2.

jans-y avatar jans-y commented on June 9, 2024

Sorry that I wasn't clear.

I have implemented ion-digit-keyboard element in the app.html.

On the particular pages, I have subscribed for the onHide and onClick event.

When browsing between pages, scrollToTop() inside onHide subscribe function breaks.
(http://ionicframework.com/docs/api/components/content/Content/#scrollToTop)

That's also true for onClick. Subscriber from the closed page continues to function even after closing that page.

Thank you very much for your work!

Ionic: 3.2.1

from ion-digit-keyboard-v2.

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.