Skip to content

Where to add Images and other files in 1.0.0-beta.14 #2126

Closed

Description

@MateenKadwaikar
  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    Windows 10
  2. Versions. Please run ng --version. If there's nothing outputted, please run
    in a Terminal: node --version and paste the result here:
    angular-cli: 1.0.0-beta.14
    node: 6.5.0
    os: win32 x64
  3. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.
    ng new Angu2Final.

I read online that in project we have public folder but when I pulled the code there was not public folder and when I did ng build I was not able to see my images .


Thanks! We'll be in touch soon.

Activity

  1. changed the title [-]Where to add Images and other files.[/-] [+]Where to add Images and other files in 1.0.0-beta.14[/+] on Sep 15, 2016
  2. alexciesielski commented on Sep 15, 2016

    @alexciesielski

    See the property 'assets' in angular-cli.json.
    This means images (or assets in general) have to be placed under root/assets, in this case it will be under src/assets.

    "apps": [
        {
          "root": "src",
          "outDir": "dist",
          "assets": "assets",
          "index": "index.html",
          "main": "main.ts",
          "test": "test.ts",
          "tsconfig": "tsconfig.json",
          "prefix": "app",
          "mobile": false,
          "styles": [
            "styles.css"
          ],
          "scripts": [],
          "environments": {
            "source": "environments/environment.ts",
            "dev": "environments/environment.ts",
            "prod": "environments/environment.prod.ts"
          }
        }
    
  3. CraigWarford commented on Jan 17, 2017

    @CraigWarford

    Okay, so... It's copying /src/assets/images to /dist/assets/images, but it's not copying all files. In my case, it copies the four .png files, and leaves the one .jpg file sitting there.

  4. 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.

  5. 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