javascriptionic-frameworkvue.jsionic4ionic-cli

How do I start a new Ionic 4 app without using Angular? With Vue.js or Vanilla JS


I am getting started with Ionic 4, and wondering how to start a new app without using Angular? The guide mentions ionic start for this, as in ionic start [name] [template] but this creates a scaffolding set up for Angular. I think I saw a video explaining how to use non-Angular but can’t find it again now. I’m looking to use Vue or no framework.


Solution

  • As I understand the README, if you are looking for an Ionic Vue application, at this time, you should first create a project with Vue and then add Ionic.

    Copy/paste of the Ionic's Vue README:

    To get started simply install @ionic/vue and @ionic/core with npm into your project and then register @ionic/vue as a plugin to your vue application.

    So first:

    npm install @ionic/vue @ionic/core --save
    

    and then as described in the README:

    import Vue from 'vue';
    import Ionic from '@ionic/vue';
    Vue.use(Ionic);
    
    new Vue({
      router,
      store,
      render: h => h(App)
    }).$mount('#app');
    

    I didn't tried but it's what I would try ;)