From @GilHyeon on August 8, 2017 5:29
I wrote code Angular4 with vscode. some module auto import is wrong.
for example, Routes, RouterModule auto import like this
import { Routes, RouterModule } from "@angular/router/router";
but it's not correct. this is correct import statement
import { Routes, RouterModule } from "@angular/router";
this problem have also 'angular/forms' modules import
// wrong import
import { FormGroup } from "@angular/forms/forms";
// correct import
import { FormGroup } from "@angular/forms";
- VSCode Version: 1.14.2
- OS Version: MacOS 10.12.5(16F73)
Steps to Reproduce:
- wrote Routes and click yellow lamb.
- select import but there is no correct import statement
- this step has 3 recommend statements
import { Routes } from "@angular/router/src";
import { Routes } from "@angular/router/public_api";
import { Routes } from "@angular/router/router";
- I select third statement. but it occurred build error.
- I changed statement correctly
import { Routes } from "@angular/router
- next, RouterModule add auto import is done correctly like this
import { Routes, RouterModule } from "@angular/router";
Reproduces without extensions: Yes
Copied from original issue: microsoft/vscode#32120
From @GilHyeon on August 8, 2017 5:29
I wrote code Angular4 with vscode. some module auto import is wrong.
for example, Routes, RouterModule auto import like this
but it's not correct. this is correct import statement
this problem have also 'angular/forms' modules import
Steps to Reproduce:
Reproduces without extensions: Yes
Copied from original issue: microsoft/vscode#32120