BeastCode / VSCode-Angular-TypeScript-Snippets

Visual Studio Code TypeScript snippets (TypeScript, Html, Angular Material, Flex Layout, ngRx, RxJS & Testing) for Angular 17
https://marketplace.visualstudio.com/items?itemName=Mikael.Angular-BeastCode
MIT License
92 stars 49 forks source link

How to use pwa-manifest? #77

Closed atiris closed 6 years ago

atiris commented 6 years ago

What is this snippet pwa-manifest and when (in which files) can I use it?

I've tried all commands sequentially, but I do not know how to call this one.
This snippet is included in the version 6.0.0 according to https://github.com/BeastCode/VSCode-Angular-TypeScript-Snippets/blob/41bd55cab3621668d452098b4b0c8b573b4d0867/CHANGELOG.md

BeastCode commented 6 years ago

Hi Jozef,

the pwa-manifest was causing an issue generating the snippets, so I temporary disabled it, but it's back now in the version i published today.

It's meant to be used in the manifest.json file, see https://developers.google.com/web/fundamentals/web-app-manifest/ for more info.

Let me know how it goes and if you have any suggestions for improvements.

thanks /Mikael

atiris commented 6 years ago

Hi Mikael, yes, after testing in version 6.2.8 everything works now. Feel free to close this bug. Thanks


If you asking for improvements suggestion, I thought this:

Now the snippets looks like: image

I experimeted with extended description. It would be good if snippet can directly referred to documentation and an example of use:

{
  "prefix":"ng-for",
  "description":"For-loop directive - [Documentation](<https://angular.io/api/common/NgForOf>) | [Example](<https://angular.io/guide/displaying-data#showing-an-array-property-with-ngfor>)",
  "types":"typescript, html",
  "body":["*ngFor=\"let ${item} of ${items}\"$0"]
}

But I see this is not possible on snippets now. If you do this in class, you get:

image

And user can CTRL+CLICK to open documentation and example directly. I can't find any solution for this with snippets but you can maybe hit something if it is possible.

Greetings Jozef

BeastCode commented 6 years ago

That's a cool suggestions. I don't think it's possible today, but maybe we can get the VSCode team to add functionality that would enable us to add it.