#Angular 17 standalone components in a library dependency problem

15 messages · Page 1 of 1 (latest)

sly cairn
sly cairn
#

Angular 17 standalone components in a library dependency problem

zealous trout
#

Why do you have all these src folders and ng-package.json and index.ts and public-api.ts files? You should just have the top-level ones, and list all the components in the single, top-level public-api.ts file, and use relative paths for your imports.

sly cairn
#

I saw it in an example that they do it like that, but you're right, I'm going to try as you say.

#

u said @zealous trout like these no?

zealous trout
#

use relative paths for your imports: import { CardComponent } from '../card/card.component';

sly cairn
#

u say in public-api.ts?

#

ah no there

zealous trout
#

everywhere in the library (probably in the cart-details component, but you truncated the error message)

sly cairn
#

That's right, I was able to fix the error, I focused on doing it like that and it was a folder architecture error haha

#

@zealous trout hmm now in my other project when i import library i have these error, probably i need do something on my library no?

zealous trout
#

Have you built it and installed it in that other project somehow?

sly cairn
zealous trout