【问题标题】:ASP.Net Boilerplate & jTableASP.Net 样板和 jTable
【发布时间】:2014-11-16 12:58:58
【问题描述】:

我研究了 ASP.Net 样板模板 (http://www.aspnetboilerplate.com/Templates) 并进行了一些自定义更改。 我的服务中有一个“GetComponentDataList()”方法。我玩弄了它并将其呈现为如下所示的列表:

 <!-- Component list    -->
 <ul class="list-group" ng-repeat="component in vm.components">
    <div class="list-group-item">
        <br />
        <span>Entry:</span>
        <span>{{component.entry}}</span>
    </div>
 </ul>

components.js 代码:

vm.refreshComponents = function () {
            abp.ui.setBusy( //Set whole page busy until getComponentDataList complete
               null,
               componentDataService.getComponentDataList( //Call application service method directly from javascript
               ).success(function (data) {
                   vm.components = data.componentData;
               })

           );
        };

现在我想通过 jTable 渲染组件。 jTable 期望一个动作来获取数据列表:

listAction: '/api/services/app/componentData/GetComponentDataList',

如何使用样板模板中的 jTable?

     1. Do I need to add a method in my "HomeController" to use jTable?
     2. The result of my "GetComponentDataList" method in my service is of type IOutputDto.
        That means the result of my service is not directly a list. There is one indirection
        level inbetween. Seems like this does not fit together.
     3. Can I provide a function in my JS-ViewModel and use that function instead of an action URL?

任何提示都会很棒。

谢谢。

【问题讨论】:

    标签: asp.net asp.net-mvc boilerplate


    【解决方案1】:

    【讨论】:

    • 此链接已损坏,我在 abp 示例项目中没有看到任何使用 jtable 的示例。我们是否必须考虑弃用 abp.jtable?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-12-11
    • 2019-02-07
    相关资源
    最近更新 更多