ngVue is a JavaScript module designed to integrate Vue 2 components within AngularJS 1.x applications. It provides a bridge, enabling developers to use Vue's reactive data binding and component-based architecture within existing Angular 1.x codebases. This allows for a gradual migration of view layers from Angular 1.x to Vue 2, addressing common performance bottlenecks related to Angular's scope watchers and offering a more predictable one-way data flow. The current stable version is 2.2.1. While the project sees occasional maintenance releases to address minor issues and improve compatibility (e.g., ESM support), its primary use case targets older, established Angular 1.x applications rather than new development. Key differentiators include its `vue-component` directive and `createVueComponent` factory, specifically tailored for interop between these two legacy frameworks. For Vue 3 support, users are explicitly directed to use the separate `ngVue3` package.
npm install ngVueVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to integrate a Vue 2 component into an AngularJS 1.x application using `ngVue`, passing props and handling events.
If migrating to Vue 3, install `@jaredmcateer/ngvue3` and refactor component integration accordingly. Do not attempt to use `ngVue` with Vue 3.
Upgrade to `ngVue@2.2.0` or later for significantly improved and more robust ESM compatibility. If stuck on an older version, consider using CommonJS imports or a bundler configuration that specifically handles legacy module formats.
Thoroughly test applications when upgrading from `ngVue` versions prior to 2.0.0, especially those using complex component interactions or the Vue 2 Composition API features.
Upgrade `ngVue` to version 1.7.8 or later to resolve the memory leak issue.
Ensure all custom events emitted by Vue components integrated with `ngVue` are defined and emitted using kebab-case (e.g., `my-event`) rather than camelCase (e.g., `myEvent`).
Upgrade `ngVue` to version 1.7.5 or later. If using an older version and a bundler, ensure `process` is properly polyfilled or mocked for browser builds.
Upgrade `ngVue` to version 1.7.4 or later to fix the logger initialization logic.