Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(@schematics/angular): remove useless import for Ivy #11874

Merged
merged 1 commit into from
Aug 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BrowserModule } from '@angular/platform-browser';
<% if (!experimentalIvy) { %>import { BrowserModule } from '@angular/platform-browser';<% } %>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is the same problem for AppRoutingModule, as at the moment it looks like this is only being used if it's not experimentalIvy

imports: [<% if (!experimentalIvy) { %>
BrowserModule<% if (routing) { %>,
AppRoutingModule<% } %>

I think that AppRoutingModule shouldn't be effect by the fact if experimentalIvy is enabled or disabled.

That said, maybe @hansl can confirm about this, as he initial working on implementing the experimentalIvy support

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. I generated it without the routing flag so I didn't see it, but I can add it if @hansl confirms.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I don't even know if we support router in Ivy.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I amended the commit to remove the AppRoutingModule if the experimentalIvy flag is used.

import { NgModule } from '@angular/core';
<% if (routing) { %>
<% if (routing && !experimentalIvy) { %>
import { AppRoutingModule } from './app-routing.module';<% } %>
import { AppComponent } from './app.component';

Expand Down