A
A
Aibek Kendirbaev2017-03-28 16:20:34
Angular
Aibek Kendirbaev, 2017-03-28 16:20:34

How to remove exported js file in angular 2 when changing route?

I load a js file into the component, which should work only in a certain view. However, when changing the js route, the file remains in the cache and errors appear in other views because of this. How to make sure that the js file is not added to the cache? Or how to remove it from there?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
ozknemoy, 2017-04-16
@ozknemoy

It's not clear what the script is. Apparently a third-party non-angular plugin. it would be nice to encapsulate it as a service

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question