ngx-is-standalone
v0.3.0
Published
is standalone for angular
Downloads
87
Maintainers
Readme
Ngx Is Standalone
Is standalone for angular
Install
if you use npm:
npm install ngx-is-standalone
if you use yarn:
yarn add ngx-is-standalone
Feedbacks
https://github.com/damingerdai/ngx-is-standalone/issues
Simple Configuration
import { NgxIsStandaloneModule } from 'ngx-is-standalone';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
NgxIsStandaloneModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Usage
import { Component } from '@angular/core';
import { NgxIsStandaloneService } from 'ngx-is-standalone';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
public get isStandalone() {
return this.ngxIsStandaloneService.isStandalone;
}
constructor(private ngxIsStandaloneService: NgxIsStandaloneService) { }
}