Libraries do not support exporting assets such as images. You can however
use this customer builder to copy your assets in the output directory of
your library: https://www.npmjs.com/package/@linnenschmidt/build-ng-packagr

Watch out you need to copy the assets in all output folders:

[image: image.png]

*Bastien Lemaire*


On Thu, 17 Sep 2020 at 14:07, Terry Lacy <terry.l...@gmail.com> wrote:

>
> I've put some images in my Angular library project under the
> /src/assets/images folder.
>
> Now I'd like to link to images from a component html template in the
> library using "<img href='...'>", but I haven't found a link that works.
> Everything I've tried gives me a 404.
>
> I'd like it to work both when testing my library from within an app in the
> same workspace, and when the library is installed in an app from the npm
> package.
>
> Thanks,
> Terry
>
> --
> You received this message because you are subscribed to the Google Groups
> "Angular and AngularJS discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to angular+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/angular/e42ea554-02f1-423f-b941-2676404f1023n%40googlegroups.com
> <https://groups.google.com/d/msgid/angular/e42ea554-02f1-423f-b941-2676404f1023n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/CAJ7E9zFE%2BjBFZ97vE74gBxw4FWuQsYrEoFksW2F%2BLVcOwmXz-g%40mail.gmail.com.

Reply via email to