Skip to content

Need more documentation for using assets #2913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
guidoffm opened this issue Oct 27, 2016 · 3 comments
Closed

Need more documentation for using assets #2913

guidoffm opened this issue Oct 27, 2016 · 3 comments

Comments

@guidoffm
Copy link

Until angular-cli beta 16 I can place an asset (e.g. image) file in an arbitrary folder. When the file is referenced from an HTML template with relative path and then an "ng build" is done, we find this file with a new egneric name in the dist folder. When an asset is referenced with a non existing path then we cat a build error saying the file does not exist.

Starting form angular-cli beta 17 it seems that there is a new behavior. Only files that are in the assets folder are copied to the dist folder. References in HTML files to other assets ar ignored and also non existing paths are ignored.

Is there a documentation about that and how can I control this behavior?

@grizzm0
Copy link
Contributor

grizzm0 commented Oct 27, 2016

As of beta 18 the assets key in angular-cli.json can be an array of assets to copy over to dist during prod build.

There's an open PR about docs. #2905

@filipesilva
Copy link
Contributor

@guidoffm that was actually a bug in beta.17 - we didn't intend to change that behaviour. It was fixed in #2537 and released on beta.18.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants