angular - Non-singleton services -


i have file upload component i'm using several times in 1 view. have service manages metadata each uploading file. when add files 1 component, components start updating instead of 1 had files added.

is there way have new instance of service attached each component being displayed?

according the docs:

providing service @ component level ensures every instance of component gets own, private instance of service.

so rather listing service in providers of application module, try listing in lower-level component definition.


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -