Sorry, I should've said what version of Angular I'm using. I'm on Angular 
10. As of Angular 9, assets are automatically copied to the dist folder of 
the library by ng-packagr. That part is working fine.

So, I'm just wondering if there's a way to link to them (e.g. from an img 
element) from a library component's html template.

Thanks,
Terry
On Thursday, September 17, 2020 at 6:37:33 AM UTC-6 [email protected] 
wrote:

> 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 <[email protected]> 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 [email protected].
>> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/120d747f-0fa5-46e3-9603-e914bd29291bn%40googlegroups.com.

Reply via email to