Package Exports
- @santech/angular-analytics
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-analytics) 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-analytics

@santech/angular-analytics is a npm module that exports santech analytics module 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-analytics -SImport module
import { SantechAnalyticsModule } from '@santech/angular-analytics';
// or
var SantechAnalyticsModule = require('@santech/angular-analytics').SantechAnalyticsModule;
// or
var SantechAnalyticsModule = santech.AngularAnalytics.SantechAnalyticsModule;Examples
Angular 2
import { Component, Inject, NgModule } from '@angular/core';
import { IAnalyticsJS } from '@santech/analytics-core';
import { ANALYTICS, SantechAnalyticsModule } from '@santech/angular-analytics';
import { CONFIG_END_POINTS, SantechCommonModule } from '@santech/angular-common';
import { SantechPlatformModule } from '@santech/angular-platform';
@NgModule({
imports: [
SantechPlatformModule.forRoot(),
SantechCommonModule.forRoot({
endPointsProvider: {
provide: CONFIG_END_POINTS,
useValue: {
endPoint: 'endpoint/to/gateway',
wsEndPoint: 'ws://host:port',
},
},
}),
],
declarations: [AppComponent]
})
export class AppModule {}
@Component({
selector: 'app',
template: 'template',
})
export class AppComponent {
constructor(@Inject(ANALYTICS) analytics: IAnalyticsJS) {
analytics.page();
}
}