EXCEPTION: Uncaught (in promise): Error: Cannot find module ‘app/home/home.module’

For Angular 8 and 9, the lazy load declaration changed. Since Angular 8 introduced the new recommended module loading method, previously the default method of lazy loading modules was to specify a string path to a module: { path: ‘auth’, loadChildren: ‘src/app/auth/auth.module#AuthModule’ } The method of importing modules has changed to dynamic import. The dynamic … Read more

How to handle routing in Angular 5+ Service Workers?

TL;DR: I’ve identified at least two issues causing breakage in my case; you can use this build script for now to try my fix, and see the app work offline here. Further testing & pull requests needed. While I’ve been unable to find a documented answer, here’s what I’ve been able to find thus far, … Read more

Is there a way to specify angular version with the ng new command

It can be done by using npx command that downloads and runs the package without installing it. For example, npx @angular/cli@9 new my-project creates a new folder my-project in the current folder and puts a new project here using angular version 9. The local version of @angular/cli in this case will be the same as … Read more

How can I upgrade an Angular CLI project?

USEFUL: Use the official Angular Update Guide select your current version and the version you wish to upgrade to for the relevant upgrade guide. https://update.angular.io/ See GitHub repository Angular CLI diff for comparing Angular CLI changes. https://github.com/cexbrayat/angular-cli-diff/ UPDATED 26/12/2018: Use the official Angular Update Guide mentioned in the useful section above. It provides the most … Read more

Error: No provider for Overlay!

I managed to eliminate this error by adding this to app.module.js: import {OVERLAY_PROVIDERS} from “@angular/material”; @NgModule({ imports: [… ], declarations: […], providers: [OVERLAY_PROVIDERS], bootstrap: […] }) Edit (May 2018): OVERLAY_PROVIDERS is now deprecated. use the OverlayModule instead import { OverlayModule } from ‘@angular/cdk/overlay’; @NgModule({ imports: [ OverlayModule ], declarations: […], providers: […], bootstrap: […] })

Is it possible to build separate CSS file with angular-cli?

Yes! In your angular.json file the common thing to do is “styles”: [ “styles/bootstrap.scss”, “styles/app.scss”, “styles/whatever-else.scss” ] and that all gets combined into a dist/styles.5d56937b24df63b1d01d.css file or whatever it decides to name it. INSTEAD you can use the object notation defined here “styles”: [ { “input”: “styles/bootstrap.scss”, “bundleName”: “bootstrap” }, { “input”: “styles/app.scss”, “bundleName”: “app” … Read more

Using scss as default style sheet in Angular 6+ (styleExt)

The position on which this is set changed in the angular.json. There are 2 ways to set this option now. Via the Angular CLI: ng config schematics.@schematics/angular:component.styleext scss Directly in the angular.json: “schematics”: { “@schematics/angular:component”: { “styleext”: “scss” } } Angular 9 Update: Note that from Angular 9 onwards styleext is renamed to style. So … Read more

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