# ngy-admin

> ## Installation

Latest version **0.0.3** (published 2020-09-02) · 0 weekly downloads

## Install

```sh
npm install ngy-admin
pnpm add ngy-admin
yarn add ngy-admin
bun add ngy-admin
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2020-09-02 |
| First published | 2020-08-27 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | st6phn |

## Links

- npm: https://www.npmjs.com/package/ngy-admin
- Repository: https://github.com/aimin-dev/ngy-admin
- Homepage: https://github.com/aimin-dev/ngy-admin#readme
- Issues: https://github.com/aimin-dev/ngy-admin/issues
- npm.io page: https://npm.io/package/ngy-admin

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.0.0

## Recent versions

- 0.0.3 (latest) — 2020-09-02
- 0.0.2 — 2020-08-27

## README

# NgyAdmin

## Installation


### Install the package

Using npm

`npm install --save ngy-admin` [Karma](https://karma-runner.github.io).

Using yarn

`yarn add ngy-admin`

### Install dependencies
NgyAdmin depends on several packages, you need to install these packages

`npm install  @angular/cdk @angular/material @api-platform/api-doc-parser  @ngx-formly/core  @ngx-formly/material  @ngx-formly/schematics  @ngx-loading-bar/core  @ngx-loading-bar/http-client  @ngx-loading-bar/router  bootstrap  change-case  deepmerge  lodash.get  openapi-types  pluralize`

### Import NgyAdminModule

In your root module, you need to import the module, use @angular/router and have an `<router-outlet>` in your root component

You also need to import import BrowserAnimationsModule from `@angular/platform-browser/animations`

``` Typescript
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgyAdminModule } from 'ngy-admin';
// ...

@NgModule({
  // ...
  imports: [
    // ...
    BrowserAnimationsModule,
    NgyAdminModule.forRoot({
      entrypoint: 'https://your-hydra-rest-api-url',
      basePath: 'admin',
    }),
    // ...
  ],
  // ...
})
export class AppModule { }
```

### Add a `global` variable on `window`

In your `index.html` file, add the following line of code :
``` JavaScript 
<script>window.global = window;</script>
```

### Include Roboto font and Material Icons

For example, in your index.html file, add these lines

```HTML
  <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
```

### Include ngy-admin styles
``` scss
@import '~ngy-admin/src/assets/scss/styles.scss';
```

**That's it! You can run your app and access your admin in `/admin`**

*Enjoy*

---
_Source: https://npm.io/package/ngy-admin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
