Skip to content

Need more documentation for using assets  #2913

Closed

Description

@guidoffm

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?

Activity

  1. grizzm0 commented on Oct 27, 2016

    @grizzm0
    Contributor

    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

  2. filipesilva commented on Nov 2, 2016

    @filipesilva
    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.

  3. angular-automatic-lock-bot commented on Sep 6, 2019

    @angular-automatic-lock-bot

    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.

  4. locked and limited conversation to collaborators on Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions