Skip to content

How to link custom files? Where is dist folder? #1802

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
usmanwalana opened this issue Aug 22, 2016 · 5 comments
Closed

How to link custom files? Where is dist folder? #1802

usmanwalana opened this issue Aug 22, 2016 · 5 comments

Comments

@usmanwalana
Copy link

Hello,
I am new to angular-cli. I have 2 questions.
1.After creating a new project using ng new , the dist folder is not created. how to create it and keep it updated?
2.How to link custom files? I paste them in public folder but how to link them ? for example any css or image files?

  1. OS? Mac OSX ( El Capitan?)
  2. angular-cli: 1.0.0-beta.11-webpack.2
    node: 6.4.0
    os: darwin x64
@deebloo
Copy link
Contributor

deebloo commented Aug 22, 2016

hey @usmanwalana. The dist folder is only created when you create builds. If you run ng build you will see your dist folder with all of your public files copied into it.

@usmanwalana
Copy link
Author

usmanwalana commented Aug 22, 2016

Thankyou @deebloo . I ran ng build now dist is created and my files are copied to it.
However i am still having problems linking to css files.
Please tell what path should i enter in index.html for linking css file.
I am using this tag
<link href="../dist/css/bootstrap.css" rel="stylesheet">

@yusijs
Copy link

yusijs commented Aug 22, 2016

Create css folder in public dir, and add bootstrap.css there. Then link as css/bootstrap.css ☺

@filipesilva
Copy link
Contributor

@deebloo's answer was spot on. As for global CSS, a better way was added in #1633 and should be in the next release.

@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

4 participants