Closed Coder7777 closed 7 years ago
Same way you would use it in ionic 1
Hi
I don't use Ionic 1/2 for app development, so I haven't tech details about what you are asking
I don't think that, for using such plugin in ionic, there are particular issues ... however if you gather Help & HowTo related it, please share with me
So basically you can do:
ionic plugin add add cordova-plugin-broadcaster
Then in your code just use the JS samples as provided, like window.broadcaster.addEventListener('eventName', event => console.log(event));
.
If typescript complains about broadcaster
not defined on Windows
, just declare the interface like:
interface Windows {
broadcaster: any;
}
FYI, I submitted a PR to add the Broadcaster support in ionic native
Looks great ... I'll watch the progress
such plugin has been added to ionic-native distribution How to is available here
very less doc to descript how to use cordova broadcaster in Ionic2? Could please offer a full demo?