Using cordova-plugin-ace with Ionic 2


#1

I want to execute native code with Project Ace, but I don’t know where to put the code in my project. Searching through google I found out that I have to put the code in this.platform.ready().then(()). Unfortunately, this isn’t working for me. I get the error that ace is not defined. I already added the plugin with ionic commandline tools - but no success.

Can anyone help me ? Do I have to write an import statement or something?

The documentation is showing nothing like that.

Thanks in advance


#2

Have you read this?


#3

Unfortunately, no success. The error is bundle failed: Could not resolve 'cordova-plugin-ace'. Do you have another idea?

Thanks in advance


#4

I got this working by adding ace as

declare let ace: any;

then just put your code inside platform.ready()