Within my angular.json file, I am utilizing the following code snippet:
"root": "admin/",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"baseHref": "/admin/",
"deployUrl": "/admin/",
"outputPath": "dist/front/admin",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
{
"glob": "**/*",
"input": "src/assets/",
"ignore": ["**/*.svg"],
"output": "/assets/"
}
],
...
However, I am encountering an issue when trying to display images. The following code does not seem to work:
<img src="/assets/images/test.png">
In contrast, this code functions as expected:
<img src="admin/assets/images/test.png">
I would like to know how to set the "admin/" prefix in angular.json for each asset. Help would be appreciated.