[Solved] ngStyle background-image [duplicate]


Try this

<div class="parallax" [ngStyle]="{'background-image': 'url('+ parallaxImage+')'}"></div>

or

 getParallaxImage(){
    return "url(" + this.parallaxImage + ")";
  }

Both solutions will work now, use as per your requirements.

0

solved ngStyle background-image [duplicate]