0

i want to build my angular app available to get at local.client.appname.com:8000/admin/angular. The app is written in clear HTML and CSS, but on this specific route i want to have built angular app. When i build it using :

 ng build 

then my app on this route can't find styles.css

I have same problem when i use :

ng build
ng build --base-href=local.client.appname.com:8000/admin/angular
ng build --base-href=/admin/angular

is there any way to do this?

EDIT:

Its my index.html file

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Admin</title>
  <base href="/admin/angular/">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="styles.369fecace4557219e275.css"></head>
<body class="sidebar-mini layout-fixed layout-navbar-fixed text-sm">
<script src="runtime-es2015.858f8dd898b75fe86926.js" type="module"></script><script src="polyfills-es2015.fc22aee4fbf951b1085c.js" type="module"></script><script src="runtime-es5.741402d1d47331ce975c.js" nomodule></script><script src="polyfills-es5.e47f6f613cd9d8ed0bdf.js" nomodule></script><script src="scripts.2627377240feaa5a6485.js"></script><script src="main-es2015.890c3f6df5b6a90a7c80.js" type="module"></script><script src="main-es5.9afafd3aaac89877d412.js" nomodule></script></body>
</html>

My error is :

http://local.client.appname.com:8000/dist/angular/dist/admin/styles.css?05770201d1c76b92c136947b9f2ea1f8 net::ERR_ABORTED 404 (Not Found)
J4mJeMax
  • 301
  • 1
  • 2
  • 8

1 Answers1

0

ng build --base-href=/admin/angular/

and make sure the contents of dist are inside an actual folder /admin/angular There should be the index.html file and the rest of the project.

monxas
  • 2,475
  • 2
  • 20
  • 36