@santech/angular-platform
TypeScript icon, indicating that this package has built-in type declarations

7.0.0-beta.4 • Public • Published

@santech/angular-platform Dependency Status devDependency Status

@santech/angular-platform is a npm module that exports platform global variables & constructors for angular

Prerequisites

You need to have globally installed:

  • node 9.x.x
  • npm 5.x.x
  • yarn 1.x.x

Development

Install all the dependencies

yarn

Launch tests

yarn test

Build the package

yarn build

Publish the package

npm publish

Require package in your project

npm i @santech/angular-platform -S

Import module

import { SantechPlatformModule } from '@santech/angular-platform';
// or
var SantechPlatformModule = require('@santech/angular-platform').SantechPlatformModule;
// or
var SantechPlatformModule = santech.AngularPlatform.SantechPlatformModule;

Examples

Angular 2

import { Component, Inject, NgModule } from '@angular/core';
import { PLATFORM_LOCATION, SantechPlatformModule } from '@santech/angular-platform';

@NgModule({
  imports: [
    SantechPlatformModule.forRoot(),
  ],
  declarations: [AppComponent]
})
export class AppModule {}

@Component({
  selector: 'app',
  template: 'template',
})
export class AppComponent {
  constructor(@Inject(PLATFORM_LOCATION) location: Location) {
    // You get window.location in browser
  }
}

Package Sidebar

Install

npm i @santech/angular-platform

Weekly Downloads

0

Version

7.0.0-beta.4

License

MIT

Unpacked Size

1.1 MB

Total Files

183

Last publish

Collaborators

  • outilssantech