ialexivy / vscode-angular2-files

vscode extension generating angular files with angular cli
MIT License
61 stars 36 forks source link

app.module.ts Modified Incorrectly when it contains multi-line import statement #40

Closed jeff-a-andersen closed 4 years ago

jeff-a-andersen commented 6 years ago

If you have an import similar to following (note, this isn't depicted very well here, since multi-line code shows as a single line in this issue so please see attachments):

import { MatCheckboxModule, MatRadioModule, MatDatepickerModule, MatFormFieldModule, MatInputModule, MatSelectModule, MatPaginatorModule, MatMenuModule, MatTableModule, MatSortModule, MatDialogModule, MatTooltipModule, MatNativeDateModule, MatTabsModule, MatCardModule, MatSidenavModule } from '@angular/material';

And you generate a new component, in this instance table-pagination-example, the modification to app.module.ts is this:

import { import { TablePaginationExampleComponent } from './table-pagination-example/table-pagination-example.component'; MatCheckboxModule, MatRadioModule, MatDatepickerModule, MatFormFieldModule, MatInputModule, MatSelectModule, MatPaginatorModule, MatMenuModule, MatTableModule, MatSortModule, MatDialogModule, MatTooltipModule, MatNativeDateModule, MatTabsModule, MatCardModule, MatSidenavModule } from '@angular/material';

See the before and after attachments for diffs.

Thanks, Jeff

app.module.ts-after.txt app.module.ts-before.txt

ialexivy commented 4 years ago

Fixed