home.component.cssどのように私は、CSS Angularjs2
#first-example {
margin-top: 20%;
/*parallax_image_path not working*/
background-image: url({{parallax_image_path}});
}
home.component.html
<div class="main_container">
<div class="main_content">
<h2>Coming Soon</h2>
</div>
<div parallax id="first-example"></div>
</div>
home.component.ts
import {Component} from "@angular/core";
/**
* Created by sai on 3/7/17.
*/
@Component({
selector: "home",
templateUrl: './home.component.html',
styleUrls: ['./home.component.css']
})
export class Home {
parallax_image_path = '/assets/website_background.jpg'
}
の可能性のある重複した[ngStyle(angular2)を使用して、背景画像を追加する方法?](http://stackoverflow.com/questions/34875426/how-to-add-background- image-using-ngstyle-angular2) – JayChase