ts-importer icon indicating copy to clipboard operation
ts-importer copied to clipboard

Importing Angular components adds extra line

Open bakasmarius opened this issue 7 years ago • 2 comments

When I am at the top of a .ts file where all the imports are and I want to import a new component manually, for example AppComponent, I type "import App" and when the suggestion for AppComponent pops up, I hit enter on my keyboard. The result is two lines: import { AppComponent } from './app.component'; import AppComponent

it should be only the first line: import { AppComponent } from './app.component';

bakasmarius avatar Jul 03 '17 10:07 bakasmarius

I too would like it if this were fixed. In the meantime, I am trying to get used to not typing the import at all. Just typing the component name where I actually need it and let the extension import it for me. Which is probably the intended behavior.

dfmartin avatar Aug 28 '17 00:08 dfmartin

This is a bit hard to fix, because the usual auto complete feature is applied.

I will take a look into it, how to detect this state.

pmneo avatar Sep 25 '17 05:09 pmneo