3

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.

  • 1
    I used to think Ionic 4 was all about ditching Angular and instead using custom elements? – connexo Feb 15 '19 at 19:56
  • No it still has tight integration, but it’s now optional, so other frameworks or vanilla can be used. The docs still haven’t been fully updated though, so still only talk about Angular in some places. –  Feb 15 '19 at 19:58
  • 1
    I've posted your question on the Ionic team slack for you. – connexo Feb 15 '19 at 20:00
  • 1
    https://blog.ionicframework.com/a-vue-from-ionic/ includes how to get started with Vue and Ionic. Basically just `npm install @ionic/vue`. – ceejayoz Feb 15 '19 at 21:02
  • If you have not done much with Ionic yet and maybe want to switch, you could have a look at [quasar](https://quasar-framework.org/) which offers native Apps and electron support, too.
    A big difference here is that it completly works with VueJS, so if you never want to use Angular this could be the by far easier method. Here is the [Getting started](https://quasar-framework.org/guide/introduction-to-quasar.html).
    – strifel Feb 16 '19 at 09:12

1 Answers1

1

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 ;)

David Dal Busco
  • 7,975
  • 15
  • 55
  • 96
  • Thanks David, so currently `ionic start` only supports Angular then. –  Feb 16 '19 at 17:46
  • I'm not sure but I would that today (February 2019) yes. But in the future, I would say no respectively the CLI might support others too, but that's only my guess. See for type of project for example: https://github.com/ionic-team/ionic-cli/blob/b1ecd77efeea1d8c5786fd5b042da458d51bc0bd/packages/ionic/src/constants.ts#L8 – David Dal Busco Feb 17 '19 at 07:17
  • Not an answer, but if interested, I also wrote an article about how to add Ionic in any projects respectively without framework too ;) https://medium.com/@david.dalbusco/using-ionic-without-any-frameworks-775dc757e5e8 – David Dal Busco Feb 17 '19 at 07:18
  • Cool, my pleasure – David Dal Busco Feb 18 '19 at 14:13