JSPM

  • Created
  • Published
  • Downloads 36
  • Score
    100M100P100Q83819F
  • License MIT

Angular library with basic elements and for communication with the lenne.Tech Nest Server

Package Exports

  • @lenne.tech/ng-base
  • @lenne.tech/ng-base/bundles/lenne.tech-ng-base.umd.js
  • @lenne.tech/ng-base/fesm2015/lenne.tech-ng-base.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@lenne.tech/ng-base) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Angular Base

This is the base library of lenne.Tech for Angular.

Description

This library contains all the basics to start a new project in combination with the lenne.Tech Nest Server:

  • GraphQL service and elements for easy communication with GraphQL API (via Models)
  • Standard Model with methods for mapping, cloning and comparing models
  • Basic User Model with basic rights handling
  • Loading Service for the subscription of loading processes
  • Storage Service for comfortable saving of data in local storage
  • GraphQL service and elements for easy communication with GraphQL API (via Models)
  • Authentication service for user registration
  • and much more

For setting up a new project we recommend our Angular Starter, which already contains this library and also includes a few sample elements as templates.

Requirements

Integration into an Angular project

Installation

cd path/to/your/angular-project
npm i @lenne.tech/ng-graphql-client

Integration in your App Module (src/app/app.module.ts):

import { GraphQLModule } from '@lenne.tech/ng-graphql-client'
@NgModule({
  imports: [
      GraphQLModule.forRoot({
        apiUrl: 'https://url.to-your.domain/api',
        authGuardRedirectUrl: '/path/to/login', // optional (default: '/auth')
        prefix: 'prefixForLocalStorageKeys', // optional (default: '')
        scrollDetectionOffset: 200, // should be >= scrollOffset, optional (default: 200)
        scrollOffset: 100, // optional (default: 100)
        storageType: 'local' as StorageType, // optional (default: 'local')
        version: '0.1', // to set version for storage keys, optional (default: '')
      })
  ],
})

Usage

Description follows ...

Thanks

Many thanks to the developers of Angular, Apollo Angular and all the developers whose packages are used here.

License

MIT - see LICENSE