npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ng-ag-grid-schematics

v1.6.2

Published

Angular AG Grid Schematics

Downloads

56

Readme

ng-ag-grid-schematics

ng-ag-grid-schematics is a set of Angular schematics that simplify the integration of the ag-Grid data grid library into your Angular applications. With these schematics, you can quickly generate Angular components, templates, and stylesheets tailored for use with ag-Grid, while also managing ag-Grid dependencies and styles effortlessly.

Follow this guide to get started with ng-ag-grid-schematics in your Angular projects.

Installation

Install ng-ag-grid-schematics from npm to your Angular project:

ng add ng-ag-grid-schematics

This command will add ng-ag-grid-schematics to your project and configure it for use.

Running the Schematic

Generate ag-Grid components and configure your project by running the following command:

ng generate ng-ag-grid-schematics:nags

This command will launch a series of prompts to help you configure and generate ag-Grid components.

Input Configuration

You will be prompted to provide the following inputs:

  • Name: Enter a name for your ag-Grid component.
...
? What name would you like to use for the component? my-grid
...
  • Project: Specify the project to run the schematic in. Note: Since Angular 14, the defaultProject property has been deprecated, and the default project must be explicitly specified.
...
? Enter project name: my-angular-app
...
  • Path: Specify the path where you want to generate the component. The path parameter specifies the location where the component will be generated. This path is relative to the project root src/app/${path}.
...
? Enter the path for the component: shared/components/ag-grid
...

Styling and State Management

You will also be prompted to configure the styling and state management for your ag-Grid component:

  • Style: Select the stylesheet format for your component. You can choose between "No stylesheet," "CSS," or "SCSS.". Note that your selection should correspond to the inlineStyleLanguage configuration in your angular.json file.

  • State Management: Choose a state management option for preserving changes in your grid component. Options include "No State," "Component Store," and "Component Store with EntityAdapter."

File Generation

After providing the necessary inputs and configuration, the schematic will generate the following files and perform the following actions:

  • Generate ag-Grid component files based on your inputs (component, template, styles).

  • Add ag-Grid styles to your project's root styles file (styles.css or styles.scss).

  • Add ag-Grid dependencies to your project's package.json file.

Example

? What name would you like to use for the component? my-grid
? Enter project name: ng-ag-grid-sa
? Enter the path for the component: shared/component/ag-grid
? Which stylesheet format would you like to use? SCSS   [ https://sass-lang.com/documentation/syntax#scss ]
? Which state management option would you like to use? Component Store                      [ https://ngrx.io/guide/component-store   ]
    Ag-Grid dependencies added to package.json
    Imports already exist in styles.scss. Skipping.
CREATE src/app/shared/component/ag-grid/my-grid/mock.ts (2550 bytes)
CREATE src/app/shared/component/ag-grid/my-grid/my-grid.component.html (364 bytes)
CREATE src/app/shared/component/ag-grid/my-grid/my-grid.component.ts (1295 bytes)
CREATE src/app/shared/component/ag-grid/my-grid/my-grid.model.ts (277 bytes)
CREATE src/app/shared/component/ag-grid/my-grid/my-grid.service.ts (1122 bytes)
CREATE src/app/shared/component/ag-grid/my-grid/my-grid.store.ts (3453 bytes)
CREATE src/app/shared/component/ag-grid/my-grid/my-grid.component.scss (0 bytes)
UPDATE package.json (1650 bytes)

License GitHub Workflow Status Commitizen Friendly semantic-release: angular