Background image in Angular 2

Viewed 5482

How to add picture to background by ngOnInit? I do not want to use background: url("link of my image") in CSS because this increases the load of my site. I want to do this by Angular 2 Typescript

2 Answers
Related