Reuse Angular 2 service in Chrome extension -


i have angular 2 app talks webserver via angular service (by angular service mean client side code talks webserver, in angular lingo called 'service'. example)

i build chrome extension integrates address bar (chrome.omnibox.oninputentered.addlistener) , reuses service angular app chrome ext use same code talk server side service angular app.
angular service written in typescript , uses angular's http module , rxjs.

is common so? what's best practices refactoring service such it's usable in both targets?


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

java - How to provide dependency injections in Eclipse RCP 3.x? -