From aae4e756d18d71de6d6d76d202749f4a2d95cd5e Mon Sep 17 00:00:00 2001 From: cexbrayat Date: Mon, 13 Aug 2018 09:05:23 +0200 Subject: [PATCH] feat(@schematics/angular): remove useless import for Ivy Using cli `6.2.0-beta.2` with the new `experimentalIvy` flag leads to: ERROR in src/app/app.module.ts(1,1): error TS6133: 'BrowserModule' is declared but its value is never read. --- .../schematics/angular/application/other-files/app.module.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/schematics/angular/application/other-files/app.module.ts b/packages/schematics/angular/application/other-files/app.module.ts index 281482250cfa..4ef3c6e953a1 100644 --- a/packages/schematics/angular/application/other-files/app.module.ts +++ b/packages/schematics/angular/application/other-files/app.module.ts @@ -1,6 +1,6 @@ -import { BrowserModule } from '@angular/platform-browser'; +<% if (!experimentalIvy) { %>import { BrowserModule } from '@angular/platform-browser';<% } %> import { NgModule } from '@angular/core'; -<% if (routing) { %> +<% if (routing && !experimentalIvy) { %> import { AppRoutingModule } from './app-routing.module';<% } %> import { AppComponent } from './app.component';