#Angular project in Stackblitz

4 messages · Page 1 of 1 (latest)

opaque hamlet
#

Hey, anyone tried setting up a angular project in stackblitz recently?
As I encounter problems as the default setup is with a standalone component and trying to change it to a AppModule it gives me an error. Here is the stackblitz: https://stackblitz.com/edit/angular-a16lqb?file=src%2Fmain.ts

A angular-cli project based on @angular/animations, @angular/common, @angular/compiler, @angular/core, @angular/forms, @angular/platform-browser, @angular/platform-browser-dynamic, @angular/router, core-js, rxjs, tslib and zone.js.

shy verge
#

The error message says that ZoneJS is needed. Don't remove the ZoneJS import

import 'zone.js/dist/zone';

from the main.ts file.

opaque hamlet
#

is this just needed in stackblitz? as in normal projects it isn't imported in the main.ts

shy verge
#

In a normal project, it's added in the polyfills in angular.json, but I guess Stackblitz doesn't support that option.