Injecting package into constructor

Home Forums Convertigo developers Forums as moved to Stack Overflow. Injecting package into constructor

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #238377

    Darren Bryant

    I have added a CustomAction into a control in a Mobile Builder 7.5.1 project but I am not seeing how to get the injection into the constructor. I am trying to use the @ionic-native/speech-recognition package and am not sure that I am creating the custom action correctly since the page constructor is not being updated.





    Hello Darren,

    yes this a very good question.. as you pointed out, there no way to modify the constructor of a Page class. So this is why there is another way to inject an object.
    Just use the :

    obj = this.getInstance(YourObject) ;

    to get an injected Object dynamically.

    Hope That Helps
    Convertigo Support team.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.