Ionic v2 sample with javascript - ionic-framework

I could not find a way to start Ionic v2 sample app ionic start appname --v2 with JavaScript and NOT TypeScript.
I have tried --v2 --js, --v2 --no-tsand I always get ts version of app.
Am I wrong or JavaScript version is not available any longer in sample start app?! => ionic-cli.
It seems weird.
Any idea to get it to work? Thank you for your help

Like you can see in this answer:
Just asked in ionic-v2 Slack channel and the answer was:
We're going all in on TS.
You could do your own work and covert it toa es6 workflow, but we want
people to use typescript
As #HerbiShtini mentioned in the comments, in this issue it's said that:
Ionic2 applications are only available as Typescript.

Related

ionicBootstrap not importing in app.component.ts ionic v2.1.18

Hi Everyone,
My name is Kris Chery. I am new to ionic and am using version 2.1.18. I have been following this tutorial which I think is very insightful about the powers of ionic.
https://www.joshmorony.com/an-in-depth-explanation-of-providers-in-ionic-2/
I am stuck at the ionicBootstrap implementation. For now its a simple service that needs to display a message but for some reason. I can't seem to import ionic Bootstrap it is saying that ionicBoostrap wasn't exported from node modules.
This is information is imperative for me to my dream app. Any help would be much appreciated.
UPDATE: I have done a number or research on the matter but none led to a good explanation on how to fix it or to implement it properly.
I'd recommend not using that tutorial and using the official Angular docs instead. That was written back in July. Back then Angular 2 was only in RC phase and Ionic 2 was still in beta. A lot has changed since then.
You don't want to use bootstrapping for this, your app already does it's bootstrapping in app.ts. Instead in app.module.ts you can import other module and declare providers.
Angular 2 Tutorial: https://angular.io/docs/ts/latest/tutorial/
Bootstrapping and modules: https://angular.io/docs/ts/latest/guide/ngmodule.html#!#bootstrap

My Ionic app throws a "has no method 'startInit'" error when using OneSignal

In my Ionic smart phone app, I'm using OneSignal to handle push notifications. According to some OneSignal docs, I need to initialize their plugin like this:
window.plugins.OneSignal.init(
"b2f7f966-d8cc-11e4-bed1-df8f05be55ba",
{googleProjectNumber: "703322744261"},
notificationOpenedCallback
);
This works for me. But other documentation says I should do this:
window.plugins.OneSignal
.startInit("YOUR_APPID", "YOUR_GOOGLE_PROJECT_NUMBER_IF_ANDROID")
.handleNotificationReceived(function(jsonData) {
alert("Notification received:\n" + JSON.stringify(jsonData));
console.log('Did I receive a notification: ' + JSON.stringify(jsonData));
})
.endInit();
This is what I would prefer to do, since I really want that "handleNotificationReceived" option, not just the "notificationOpenedCallback" option. But it's not working for me. I get a Javascript error saying the method "startInit" doesn't exist in the "window.plugins.OneSignal" object. It's right. There is no method "startInit", so how can I use the code that calls it?
So what am I doing wrong? Am I not using the latest version of OneSignal? I just ran "ionic plugin add onesignal-cordova-plugin --save", so I should be using their latest version. (It installs version ~1.13.2, according to my config.xml).
How can I fix this?
The newer 2.+ version of the SDK is not out yet. You should refer to the old docs for this here
EDIT
The new version of the SDK is now out and you can get it here. Also new docs are here.
Was getting the same issue. You could try reinstalling the plugins or add the platform again android/ios. That worked for me.

How do I access Ionic framework from Trigger.io?

I want to use the Ionic UI framework with Trigger.io for my hybrid mobile app, but it isn't clear to me just how to combine the two in my code because it's not like using Jquery where you just add the library to a script tag.
After install, both of these frameworks provide their own "hello world" type of index.html file, their own css and js files as well as framework specific configuration files which I know are important. So which one do I use as a base and how do I call into the other framework from that base? How do I structure the project file tree to combine the two so that when I go to do an app build for distribution, there isn't some crazy error because the frameworks are set up to look for their own files via set paths?
Here is one answer I found in my googling.
What steps do I need to take to use the Ionic Framework with trigger.io?
here is an example project on git hub:
https://github.com/travisrussi/ionic-triggerio
here is the link to the ionic cdn to be used for testing:
https://code.ionicframework.com/#

What is the 'transaction' command in Firebase-Unity Plugin?

I'm trying to use Firebase-Unity plugin. (https://www.firebase.com/blog/2015-12-18-firebase-unity.html)
Does anybody know what is the transaction command in this plugin?
Is it implemented in the plugin? If yes, can I see the sample code?
The Firebase-Unity plugin does not expose the complete underlying SDK functionality. The transaction() method of the Firebase SDK is one of the methods that is not exposed.
The author of the plugin recently commented somewhere on how to add such methods yourself. I'll see if I can find that link for you.
The tutorial that you've linked, https://www.firebase.com/blog/2015-12-18-firebase-unity.html is a good tutorial if not missing some steps.
Try this library out while following the tutorial above from Firebase: https://github.com/firebase/Firebase-Unity
Does that help?

RichTextToolbar in GWT 2.3

I'm trying to create a RichTextArea (following the GWT Showcase : link )
When I do a code completion of RichTextToolbar, I'm not able to find it. Is this an external library?
And then I googled and found this : google code link. Is this the same library in the Google Showcase? Or is the RichTextToolbar is an old implementation that not being brought to version 2.3?
Update:I tested this and what I feel is although the implementation the same, the UI looks different though.
It seems that they created their own version of RichTextToolbar.
This class is part of the GWT Showcase.
Here is a decent explanation to get the RichTextToolbar working. You take the source code from showcase basicaly.
http://www.jeanhsu.com/2010/06/10/how-to-use-richtexttoolbar-in-gwt/