如何使用AngularJs在window explorer中显示数据?

时间:2016-08-31 16:42:28

标签: javascript html angularjs browser bootstrap-modal

我正在向bootstrap模态窗口显示数据,但是我的要求是在window explorer中显示这些数据,所以在serverFiles()我想打开窗口浏览器并在其中显示数据并具有一些窗口浏览器功能,如排序等是否可以使用angularjs在window explorer中使用$ scope变量值?在谷歌搜索后我找不到可行的解决方案任何想法如何实现这个任务?

parent.html

<button type="button" class="btn btn-info  btn-md" ng-click="serverFiles()"><span class="glyphicon glyphicon-folder-open"></span></button>

modal.html

<table>
    <tr>
        <th>File</th>
        <th>
            <p ng-click="sortType = 'fileDate'; sortReverse = !sortReverse">
                Date
                <span ng-show="sortType == 'fileDate' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span>
                <span ng-show="sortType == 'fileDate' && sortReverse" class="glyphicon glyphicon-chevron-up"></span>
            </p>
        </th>
        <th>Download</th>
    </tr>
    <tr ng-repeat="file in data | orderBy:sortType:sortReverse">
        <td>{{file.filename}}<label ng-show="$last">currently recording</label></td>
        <td>{{file.fileDate |date : "dd.MM.y"}}</td>
        <td><button type="button" class="btn btn-primary" ng-click="downloadServerFile(file.filename)">download</button></td>
    </tr>
</table>

ctrl.js

$scope.serverFiles = function() {
    $scope.modalInstance = $uibModal.open({
        templateUrl: '/view/modals/serverModal.html',
        controller: 'ServerFilesCtrl'
    })
}

0 个答案:

没有答案