如何使用AngularJs动态提供图像?

时间:2016-06-02 19:37:50

标签: javascript html angularjs

在我的编码中,我提供了这样的图像,



   <h3>Posted Tasks</h3>
<input type="text" class="search" ng-model="searchString" placeholder="Search Job Posts Here" style="width: 314px;padding-bottom: 14px;"/>
<p> Hello "User" , These are all the works posted by the users. Select those tasks according to Your Category .</p>
<br>
<br>
<br>
<br>
<br>
<div  ui-sref="jobPostSearch" class="col-lg-3 col-md-5 col-sm-6" ng-repeat="x in tasklist|filter:searchString">
<div class="main-box clearfix profile-box">
  <div class="main-box-body clearfix">
	<div class="profile-box-header" style="background-image: url(app/utils/poo2.jpg);padding-bottom:222px;">
	
	  <div style=""></div>
	</div>
        <div class="profile-box-footer clearfix" >
			<span class="value" >  {{x.jobTitle}}</span>
			<span>{{x.jobDescription}}</span>
				
				 
			
&#13;
&#13;
&#13;

但我需要动态提供图片,在很多网站上都有提及,但没有明确的想法,有人可以帮我解决问题!

1 个答案:

答案 0 :(得分:0)

参考以下示例

<div class="modalContainerClass" ng-style="{'background-image': 'url(' + selectedMeal.url + ')'}">