I am creating chrome extension using angular2. The app is compiled using webpack. The problem is that when I added routing in my app, suddenly my html, can't find files in directories that exist with wanted files...
This is my source map that chrome shows:
this is my html:
<div class="app-main-component">
<img src="../images/logo-cw-white.png">
</div>
This is my dev source map (app is running using dist folder, that is made when compiled with webpack):
My routing file:
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HelloAgainComponent } from './app/hello-again.component';
import { AppComponent} from './app/app.component'
import { AppMainComponent} from './app/app-main.component'
const routes: Routes = [
{
path: '**',
component: AppMainComponent,
children: [
{
path: 'again',
component: HelloAgainComponent
},
]
}
];
@NgModule({
imports: [ RouterModule.forRoot(routes) ],
exports: [ RouterModule ]
})
export class AppRoutingModule {}
before I created routing file the image was found by html, but know it does not find it....
Error:
Failed to load resource: net::ERR_FILE_NOT_FOUND : chrome-extension://xyxyx/src/dist/images/logo-cw-white.png
As I understand my routing directories are incorrect... Can someone please help me fix this??