1.3.1 • Published 3 years ago

@frontegg/ng-core v1.3.1

Weekly downloads
26
License
-
Repository
-
Last release
3 years ago

Angular pre-built Component for faster and simpler integration with Frontegg services.

Installation

Frontegg-Angular is available as an npm package.

NOTE!: For typescript project make sure you are using typescript with version > 3.9.0

using NPX:

/* Run Frontegg Angular installer */

npx @frontegg/ng-cli init

Manual Installation

using YARN:

/* install frontegg-core */
yarn add @frontegg/ng-core

yarn add @frontegg/ng-{plugin-name}

using NPM:

/* install frontegg-core */
npm install --save @frontegg/ng-core

npm install --save @frontegg/ng-{plugin-name}

Usage

  1. Import the CoreModule to your app.module file.
/* app.module.ts file */

import { AppComponent } from "./app.component";
import { CoreModule } from "@frontegg/ng-core";

@NgModule({
  declarations: [AppComponent],
  imports: [
    CoreModule.forRoot({
      context: {
        baseUrl: `${window.location.protocol}/${host}`,
        requestCredentials: "include",
      },
      plugins: [],
    }),
    // ...rest modules
  ],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {}
  1. Wrapp your app in frontegg-provider selector in app.component.html.
/* app.component.html file */

<frontegg-provider>
  <app-component></app-component>
</frontegg-provider>

context property uses:

  • Communication Settings
  • Theme Customization
  • Component Configurations
interface context {
  baseUrl: string; // required
  urlPrefix?: string;
  requestCredentials?: RequestCredentials;
  tokenResolver?: () => Promise<string> | string;
  additionalHeadersResolver?: () => Promise<KeyValuePair[]> | KeyValuePair[];
  additionalQueryParamsResolver?: () => Promise<KeyValuePair[]> | KeyValuePair[];
}

Plugins

Frontegg-Angular provides components per plugins for faster and simpler integration

Contributing

The main purpose of this repository is to continue developing Frontend Angular to make it faster and easier to use. Read our contributing guide to learn about our development process.

Notice that contributions go far beyond pull requests and commits.

License

This project is licensed under the terms of the MIT license.

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago