You can also organize vanilla js old-style code and then access these libraries in your services, for example:
var Mirko = { }; Mirko.FunService = { getAllSomething : function (p1, p2) { }, ... }; angular.module('myModule').factory('BigService', function(){ return { methodOne : Mirko.getAllSomething, ... }; });
As a result, you will have one Mirko object that you can access outside the scope of your angular application, but it is no different from other external api (not written for angular) that you would like to use in your application. The way you process your own โexternalโ api can be done in the old fashioned way, in one file per โclassโ, for example. 'FunService'.
This may not be the most pleasant solution, but it will be a light abstraction.
Just say ...
source share