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
Post a Comment