Skip to content

dinbtechit/ngxs

Repository files navigation

drawing NGXS

Build Version Downloads Static Badge

NGXS is a state management library for Angular. This plugin provides NGXS CLI/Schematics, Intellisense and auto-completions for Jetbrains IDE.

Please ensure you have ngxs cli installed either globally or at the project level.

Features

Checkout the Feature documentation for more details.

  • Simply right click -> New -> NGXS CLI/Schematics to generate a boiler plate store.

  • Navigate to Action Implementation using Gutter Icons

  • LiveTemplate to autocompletion for creating @Actions, @Selectors and export class NewActions quickly

    • cmd + Insert/ctrl + Insert within Generator
    • Alt + Enter / options + Enter - QuickFixes and generate @Actions & @Selectors quickly
  • Advance Templates (Editor Autocompletion - Mac - cmd + space or Windows/Linux - ctrl + space)

    • methodName-action
      @Action(Add)
      add(ctx: State<StateModel>) {
       // TODO - Implement action
      }
    • methodName-parameter1:Type-action-payload
      // add-id:string-action-payload (ctrl + space)
      
      // Result 
      // *.state.ts
      @Action(Add)
      add(ctx: State<StateModel>, payload: Add) {
       // TODO - Implement action
      }
      
      // *.actions.ts
      export class Add {
       static readonly type = '[MyStore] Add';
       constructor(public id: string) {
       }
      }
    • methodName-ClassName-action
    • methodName-ClassName-parameter1:type,parameter2:type-action-payload
    • methodName-selector-meta
    • methodName-selector
  • Many more coming soon. Checkout Github - List all Enhancements

Installation

  • Using the IDE built-in plugin system:

    Settings/Preferences > Plugins > Marketplace > Search for "ngxs" > Install

  • Manually:

    Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...

How can I contribute

If you find this plugin useful consider sponsoring its development to ensure that the project is actively maintained and improved. Buy me a Coffee

image