Closed jueinin closed 3 years ago
emmm... it's a project with angularjs v1.3.x version. without the module.component API. too awkward!
There’s a directive version of angularize, would that work? https://github.com/xjpro/react-in-angularjs#directives
I have not tried the directive version yet. because of the lack of module.component
api and life cycle hooks in angularjs v1.3. I have tried the polyfill . It works, but the change of $scope won't sync to react component. i guess the reason may be that the polyfill do not implement $doCheck
api. Do you have any ideas to use React in augularjs v1.3.x project?
Here's the function in question, perhaps you could take only this function for use in your older project?
I made this project public domain so feel free to just snip what you need.
it works by using angularizeDirective function, thanks! what do you think frontend microservice? it seems a better solution. I really do not want to write angularjs code....
I'd recommend React, Vue, or Angular (the new one, not AngularJS). React is my choice but they all have their merits. react-in-angularjs
is not meant to be used forever, it's for migrating older AngularJS apps to React apps using the strangler pattern.
our obsolete project is using requirejs to manage module. the commonjs module is not compatiable with requirejs.
I am trying to rewrite it to requirejs