Sergey
Sergey

Reputation: 7692

Share css and ts across projects

There is a need to share some CSS and TS across multiple Angular projects. Is there a way to do it? Copy-pasting isn't looking so good for that purpose.

Upvotes: 1

Views: 1316

Answers (1)

Nico
Nico

Reputation: 518

For each project you can try to add this in your angular.json. In the Styles part where normally there is other styles from your node package.

"styles": [

              "path/to/style/style.scss", // Your  custom style
              "node_modules/font-awesome/css/font-awesome.css" //exemple of package style

            ]

EDIT : If you need to load an external css. you can use as mentioned in your comment of your first post use "link" in the index.html from your src app folder. For each ng project. Hope it will correspond to your request.

<link rel="stylesheet" type="text/css" href="server/with/css/custom.css">

Upvotes: 2

Related Questions