Angular 4 – Could not resolve submodule for routing

I was using the absolute path convention: app/home#HomeModule and it wasn’t working.

I then tried the relative path convention: ./home#HomeModule and it worked.

… in the CLI, the paths to lazy routes should be relative from the file you’re in

Source


I followed this Tutorial and it used the absolute path convention and it worked.

Would love to know why the inconsistency…


UPDATE:

As Friedrich mentioned, to make it work using an Absolute Path, update src/tsconfig.app.json as follows:

{
  ...,
  "compilerOptions": {
    ...,
    baseUrl: "./"
  }
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)