我綁定在angularjs採用NG-重複這裏的桌子是我的表更改按鈕文本時狀態爲已批准表
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>
Sr. no.
</th>
<th>
Title
</th>
<th>
Image
</th>
<th>
Category
</th>
<th>
PostedOn
</th>
<th>
Created By
</th>
<th>
Status
</th>
<th>
Change Status
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="obj in PostedBlogList | filter:searchText" ng-show="PostedBlogList.length">
<td>{{$index+1}}</td>
<td><a ng-href="{{'//'+obj.PageUrl }}">{{obj.Title}}</a></td>
<td>
<img style="width:90px" ng-show="obj.Image" src="{{obj.Image}}">
<img style="width:90px" ng-show="!obj.Image" src="/images/mail.png">
</td>
<td>
{{obj.CategoryName}}
</td>
<td>
{{obj.CreatedDate}}
</td>
<td>
{{obj.FirstName}}({{obj.UserType}})
</td>
<td>
{{obj.IsActive ? 'Approved ' : 'Pending'}}
</td>
<td>
<button class="btn btn-primary waves-effect waves-light" ng-click="ToActiveBlog(obj.Id)" ng-bind="btnactivate" type="submit" value="Activate"></button>
</td>
</tr>
<tr ng-show="PostedBlogList.length==0">
</tr>
</tbody>
</table>
在倒數第二個TD我設置認可的價值和懸而未決。
{{obj.IsActive ? 'Approved ' : 'Pending'}}
下面TD有一個按鈕
<td>
<button class="btn btn-primary waves-effect waves-light" ng-click="ToActiveBlog(obj.Id)" type="submit" value="Activate"></button>
</td>
上它具有 如何設置按鈕上的文字「滅活」的時候我的狀態在angularjs被批准的activate
文本?
確保你在你的問題 –
'值=「{{obj.IsActive‘激活’格式化代碼:‘停用’ }}「' – Satpal
與你設置{{obj.IsActive? 'Approved':'Pending'}} – Deep