How to set the background image with Angular?

<div class="class1">
    <app-home></app-home>
    <router-outlet></router-outlet>
</div><div class="class1">
    <app-home></app-home>
    <router-outlet></router-outlet>
</div> <!-- This is the home.component.heml -->


.class1{
    background-image: url(/Users/md.nuhelnawazchowdhury/Desktop/Shoppie/andalib/src/assets/img/Shoppie1.jpeg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

I can’t get the home page to show the background image. The files above are app.component files.

Source: Angular Questions