Package Exports
- @santech/angular-platform
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 (@santech/angular-platform) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@santech/angular-platform

@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
yarnLaunch tests
yarn testBuild the package
yarn buildPublish the package
npm publishRequire package in your project
npm i @santech/angular-platform -SImport 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
}
}