ialexivy / vscode-angular2-files

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

First Pipe added causes issues #59

Open martingraham opened 4 years ago

martingraham commented 4 years ago

This may be 2 separate things. V 1.64

  1. Is it adding Pipes to the right place? It adds mine to declarations in app-routing.module.ts rather than app.module.ts. I seem to need to add the pipe to both declarations and providers in app.module.ts instead to get it to work.

  2. This I'm more confident is a little bug. When it adds a Pipe to app-routing/app.module.ts, if there is no existing declarations property, it makes the declarations property, but wraps the Pipe name in quotes. e.g. If I add two pipes, say Wrapper and Test, one after the other and *.module.ts has no declarations property to start with, I get:

    declarations: [
    "WrapperPipe", TestPipe ]

"WrapperPipe" then flags as an error in typescript