Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding vueJS into an existing angular application

I have an existing angular application and I want to start changing some of it to a vueJS application.

My application, in dev mode, loads all scripts in the main html file (in production mode its bundled into app.js but I want to start testing to dev mode).

I want to change on of the states to use vue, so I read it's possible in the following way: https://medium.lucaskatayama.com/migrating-from-angular-to-vuejs-71277cdc3dd9

However, I want to use a .vue files syntax and I don't know if that's possible without using webpack or any other bundler in dev mode.

So my question is - Is that possible? Can I use .vue files inside my ng app with the current configurations? Furthermore, is there a nice way to webpack only the vue files and components (even though I have to initialize them inside and angular controller as it seems).

If there are any good tutorials for adding vue into angular app, I would love to get them, as I failed finding good ones.

Thanks

like image 790
Rotem B Avatar asked Oct 30 '17 14:10

Rotem B


People also ask

Can I use Vue JS in Angular?

Since Angular supports using custom Web Components, you'll be able to use the Vue components (wrapped as Web Components). To Angular it doesn't make a difference if the custom Web Components were generated by Vue or not (for all Angular knows, they could be native HTML elements).

Is Vue JS outdated?

Vue. js is still a young framework. Its community and development team size is still incomparable with more mature Angular.

How do I migrate from Angular to Vue?

Setting Up Your Application For Migration To accomplish this, you should set up your AngularJS application so that it can simultaneously render both AngularJS and Vue components. This will let you build new features in Vue and port over existing features from AngularJS as you have time, budget, and resources.


1 Answers

ngVue member here :)

At Dawex (the company I'm working at), we're using Vue within a big AngularJS application, with ngVue. It's in production for several months now and it works very well. You can find more informations on this article I wrote before last summer: https://medium.com/dailyjs/how-to-migrate-from-angularjs-to-vue-4a1e9721bea8. Hope that helps!

like image 172
Nicolas P. Avatar answered Sep 17 '22 19:09

Nicolas P.