File

projects/rebirth-ng/src/lib/window-ref/document-ref.service.ts

Index

Properties
Methods

Constructor

constructor(document: any)
Parameters :
Name Type Optional
document any no

Methods

createElement
createElement(tag: )
Parameters :
Name Optional
tag no
Returns : any

Properties

Public document
document: any
Type : any
Decorators : Inject

Accessors

body
getbody()
documentElement
getdocumentElement()
import { Inject, Injectable } from '@angular/core';
import { DOCUMENT } from '@angular/common';

@Injectable(
  { providedIn: 'root' }
)
export class DocumentRef {

  constructor(@Inject(DOCUMENT) public document: any) {

  }

  get body(): any {
    return this.document.body;
  }

  get documentElement(): any {
    return this.document.documentElement;
  }

  createElement(tag) {
    return this.document.createElement(tag);
  }
}

results matching ""

    No results matching ""