I have written code like below
this._renderer.appendChild(document.body, form);
This works fine. But i am directly accessing document.body. Is there a angular 2/4 way of access document.body?
I have written code like below
this._renderer.appendChild(document.body, form);
This works fine. But i am directly accessing document.body. Is there a angular 2/4 way of access document.body?
Copyright © 2021 Jogjafile Inc.
You can inject via
DOCUMENTinjection token. This will give you thedocumentobject in Angular way (as you have said).