In order to avoid to rewrite all code when replacing angular with other framework, i wonder if there any solution to de-couple angularJS and JS? if yes, how to test them( because cant't use angular testing module anymore )?
Asked
Active
Viewed 59 times
1 Answers
0
Use services By having your code contained in services, you can easily move them around and adapt them to suit other frameworks
Having local functions Usually, you create functions that interact with the view in the scope. You could however, have them in local functions which are called by the scope functions. That way, when you change the framework, you can move retain the local functions.
These are the two things that come to mind but I am sure there are more.

callmekatootie
- 10,989
- 15
- 69
- 104