app realization
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<h1>File List</h1>
|
||||
<table class="table table-hover" ng-if="fileList">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">File name</th>
|
||||
<th scope="col">Uploaded</th>
|
||||
<th scope="col">Size</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="file in fileList">
|
||||
<th scope="row">{{$index + 1}}</th>
|
||||
<td>{{file.fileName}}</td>
|
||||
<td>{{file.uploadTime | date:'medium' }}</td>
|
||||
<td>{{file.fileSize | filesize}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('myApp.view2', ['ngRoute'])
|
||||
.config(['$routeProvider', function ($routeProvider) {
|
||||
$routeProvider.when('/view2', {
|
||||
templateUrl: 'view2/view2.html',
|
||||
controller: 'View2Ctrl',
|
||||
activetab: 'view2'
|
||||
});
|
||||
}]).run(function ($rootScope, $route) {
|
||||
$rootScope.$route = $route;
|
||||
}).controller('View2Ctrl', function ($scope, fileListService) {
|
||||
$scope.fileList = fileListService.getFileList();
|
||||
});
|
||||
Reference in New Issue
Block a user