Norbert - would you mind commenting on your use of ionic? I didn’t think I would need all the angular complexity - but then I’ve been reading that ionic has all kinds of useful goodness in it for swipes etc. So is it worth learning about this instead? Does angular play well with Amber and do you end up amber’izing any useful bits that make it nice to use - or do you write some bits in angular/js with directives and the like and then some bits in Amber?
I’m version curious about your experience?
I also thought the Ember looked like a much more reasonable framework (and it looks like there are ember+cordova combinations - but whether they have the finesse I don’t know. I just thought the ember tutorial was ver readable, and angular1 vs angular2 just sounds painful. And really I just want to write code in Smalltalk ;) and have an easy life on the web.
Tim
We are using ionic and not cordova directly but the problem should be the same in both environments.
The web page should work regardless if in devel or deploy mode. The real issue seems to be if you are running on a device or on a desktop browser. We detect in which environment the app is running and start the app differently
var isCordovaApp = (typeof window.cordova !== "undefined");
var startApp = function(amber, angular) {
amber.initialize({
//used for all new packages in IDE
'transport.defaultAmdNamespace': "port1-app"
});
angular.element(document).ready(function () {
angular.bootstrap(document, ['starter']);
});
amber.globals.Port1App._start();
}
require(['app', 'googlemaps', 'ionic', 'app-main'], function (amber, googlemaps, ionic, appMain) {
var start = function () {
startApp(amber, angular);
};
if(isCordovaApp) {
document.addEventListener("deviceready", start, false);
} else {
start();
}
}, function (err) {
…
});
The window.cordova property is created early in the process so it should be reliable.
Hope that helps,
Norbert
Maybe Norbert can chime in as he has working mobile apps with Cordova and Amber.
Maybe not a 0.15 version...
Tim,
A writeup of what you have is welcome once working!
Phil
--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[hidden email].
For more options, visit
https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[hidden email].
For more options, visit
https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[hidden email].
For more options, visit
https://groups.google.com/d/optout.