Integrate in Ionic
artiomkichojal opened this issue · 4 comments
Hello,
i want to use aceplugin to acces the java files in ionic1. I have added the plugin this way: ionic plugin add cordova-plugin-ace. But how can i use now ace?
Hier is my controller:
.controller('MyCtrl', function ($scope, $ionicPlatform) {
$ionicPlatform.ready(function () {
$scope.a = 'a';
// Vary the string based on the current platform
var className = ace.valueOn({
android: "ForAce"
, ios: "MyAlgorithm"
});
// Create an instance of the native class
var obj = new ace.NativeObject(className);
$scope.my_var = obj.invoke("foo");
});
after running ionic serve --lab i see in the browser's console error:ReferenceError: ace is not defined. Do i need to inject somewhere the ace plugin ?
thank you!
@artiomkichojal We are looking at using Ionic markup instead of XAML. That way, the ACE plugin would be automatically injected. We are still experimenting with this as of now.
This is unrelated to markup. @artiomkichojal, what happens if you use window.ace instead of just ace? Thanks!
Hello Guys,
I am using now Ionic 2 instead of v1. And ace works very well without to inject.
Thanks for your answers!
@artiomkichojal ,
I am also working on Ionic-2,
I followed up this same
https://github.com/Microsoft/ace/tree/master/examples
but still not sure how to use it in ionic 2.
what i did-
- Installed ace-
cordova plugin add cordova-plugin-ace
https://github.com/Microsoft/ace
Now don't know how to and what to do more to get html view in app.
Help me...