xjpro / react-in-angularjs

A super simple way to render React components in AngularJS
The Unlicense
23 stars 13 forks source link

angularApp.component is not a function #15

Closed shyam041 closed 2 years ago

shyam041 commented 2 years ago

I am trying to migrate application which is running in angularJs 1.3.3 to react. While doing this I am getting below error:

Uncaught TypeError: angularApp.component is not a function at angularize

please let me know the prerequisites to use this package for migration

DDani commented 2 years ago

Hi! the .component function was added above 1.5.x angular versions:

https://code.angularjs.org/1.5.10/docs/guide/component

I guess, you should upgrade; in my case I'm using react-in-angularjs with angular 1.8.2 and is working fine.

xjpro commented 2 years ago

@shyam041 Yes, this library currently uses app.component as @DDani pointed out. Any chance you can upgrade? I don't think we'll be writing the library to use older versions of directives.