
[英]AngularJS Smart Table filtering special characters with a space when displaying all rows
[英]smart table not displaying
我是AngularJS和Smart Table的新手...我試圖通過一個簡單的Smart Table示例進行工作,但是由於某些原因,我似乎無法顯示我的表數據。
這是我的html:
<body ng-controller="basicsCtrl">
<p>Hello {{name}}!</p>
<table st-table="rowCollection" class="table table-striped">
<thead>
<tr>
<th>first name</th>
<th>last name</th>
<th>birth date</th>
<th>balance</th>
<th>email</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in rowCollection">
<td>{{row.firstName}}</td>
<td>{{row.lastName}}</td>
<td>{{row.birthDate}}</td>
<td>{{row.balance}}</td>
<td>{{row.email}}</td>
</tr>
</tbody>
</table>
</body>
這是我的js:
var app = angular.module('myApp', ['smartTable.table']);
app.controller('basicsCtrl', ['$scope', function (scope) {
scope.rowCollection = [
{firstName: 'Laurent', lastName: 'Renard', birthDate: new Date('1987-05-21'), balance: 102, email: 'whatever@gmail.com'},
{firstName: 'Blandine', lastName: 'Faivre', birthDate: new Date('1987-04-25'), balance: -2323.22, email: 'oufblandou@gmail.com'},
{firstName: 'Francoise', lastName: 'Frere', birthDate: new Date('1955-08-27'), balance: 42343, email: 'raymondef@gmail.com'}
];
scope.name = "World";
}]);
這是我的代碼代碼: http ://plnkr.co/edit/335mfrwqHQXewqXJ4N0I?p=preview
謝謝!
山娜
容易修復
更改此行:
var app = angular.module('myApp', ['smartTable.table']);
對此:
var app = angular.module('myApp', ['smart-table']);
並在索引文件中對腳本標簽重新排序,以使角度在智能表之前
在相同的例子中也有類似的問題。 您是什么意思重新排序我的腳本標簽?
<script src="scripts/NonLibScripts/ScheduleScript.js"></script>
<script src="scripts/NonLibScripts/DataScript.js"></script>
這還不夠嗎? 我正在嘗試從DataScript填充智能表數據。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.