Actually I went by myself on my own today, and I found this tutorial: http://labs.encoded.io/2015/06/22/use-es6-with-ionic/
StackOverflow recommends not just using links as answers, so I'm going to give my TL, DR, since this is not my own site, and I do not want to be held accountable for c / p.
Ionic uses Gulp, so install gulp -babel and gulp -plumber.
npm install
Add babel to gulpfile.js like this:
//... var babel = require("gulp-babel"); var plumber = require("gulp-plumber"); var paths = { es6: ['./src/es6/*.js'], sass: ['./scss/**/*.scss'] }; gulp.task('default', ['babel', 'sass']); gulp.task("babel", function () { return gulp.src(paths.es6) .pipe(plumber()) .pipe(babel()) .pipe(gulp.dest("www/js")); }); //... gulp.task('watch', function() { gulp.watch(paths.es6, ['babel']); gulp.watch(paths.sass, ['sass']); }); //...
Edit ionic.project :
"gulpStartupTasks": [ "babel", "sass", "watch" ],
For more information, refer to the original link - and with this I also say thanks to the author of this blog, as it also helped me.
source share