I have a custom plugin created in cordova and it has a function, this can be invoke able from ionic now i want it vice versa
means i want to make a function call from my custom plugin and this function should be ionic
Please give the steps to do it
Sujan12
January 18, 2018, 11:00am
2
What should this Ionic “function” do when it is called from native code? What triggers the native code to run?
vkr1980
January 18, 2018, 11:19am
3
i have a calculator ui in ionic and the add/subtract will do by the native based on the value given from ionic UI and give the result back to ionic UI
Sujan12
January 18, 2018, 12:01pm
4
Then you don’t have to call Ionic code. Your Ionic code is calling the native code and can just get a result back from the native code that then can be displayed.
i want to show the result in the textbox which is in ionic
Yes, and? Call the plugin, use the result to display it in the textbox.
i dont know how to do i need the steps for that
Sujan12
January 19, 2018, 10:48am
8
You can look at any plugin that returns some value. This is one of the most popular ones: https://github.com/apache/cordova-plugin-device