0.1.5 • Published 7 years ago

angular-amazon-login v0.1.5

Weekly downloads
5
License
BSD-3-Clause
Repository
github
Last release
7 years ago

angular-amazon-login npm version

Amazon Login component for Angular written in TypeScript.

Usage

Add this script tag below in the head tag of index.html:

<script async src="https://api-cdn.amazon.com/sdk/login1.js"></script>

Import and add AmazonLoginComponent from this package to your Angular module:

import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';

import {AppComponent} from './app.component';
import {AmazonLoginComponent} from 'angular-amazon-login';

@NgModule({
  imports: [
    BrowserModule
  ],
  declarations: [
    AppComponent,
    AmazonLoginComponent
  ],
  bootstrap: [AppComponent]
})
export class AppModule {
}

Example of a component that is using this package:

import {Component} from '@angular/core';
import {AmazonAuthResponse} from 'angular-amazon-login';

@Component({
  selector: 'my-app',
  templateUrl: 'app.component.html'
})
export class AppComponent {
  constructor() {
  }

  private myClientId: string = 'your-client-id-here';

  onAmazonAuthResponse(event: AmazonAuthResponse) {
    // your code here
  }
}

In a component template, put <amazon-login> with attributes of render options and init params. clientId attribute is required.

<amazon-login
  [clientId]="myClientId"
  (amazonAuthResponse)="onAmazonAuthResponse($event)">
</amazon-login>

For more information about Login With Amazon SDK, see http://login.amazon.com/documentation

Features and bugs

Please file feature requests and bugs at the issue tracker.

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.1.2

8 years ago