當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript App.addController方法代碼示例

本文整理匯總了TypeScript中app/rota/config/app.App.addController方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript App.addController方法的具體用法?TypeScript App.addController怎麽用?TypeScript App.addController使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app/rota/config/app.App的用法示例。


在下文中一共展示了App.addController方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: goTasimaDetay

                    field: 'modelState'
                },

                {
                    name: 'editBNutton',
                    cellClass: 'col-align-center',
                    width: '30',
                    displayName: '',
                    enableColumnMenu: false,
                    cellTemplate: '<a class="btn btn-default btn-xs" ng-click="grid.appScope.vm.goTasimaDetay(row.entity[\'id\'])"' +
                    ' uib-tooltip=\'Detay\' tooltip-placement="top"><i class="fa fa-edit"></i></a>'
                }
            ]
        }
    }

    goTasimaDetay(id: number) {
        this.routing.go('shell.content.bkg.konteynerler.new', { konteynerId: id });
    }

    loadedModel(model: IKonteyner[]): void {
        this.konteynerGridOptions.data = model;
    }

    getModel(modelFilter: IBaseFormModelFilter): IBaseListModel<IKonteyner> {
        return this.BkgService.bkgModel.konteynerlar;
    }
}

App.addController("bkgKonteynerlarController", BkgKonteynerlarController, "BkgService");
開發者ID:jmptrader,項目名稱:RotaTsFramework,代碼行數:30,代碼來源:bkg.konteynerlar.controller.ts

示例2: constructor

ďťżimport {App} from "app/rota/config/app";
import {BaseFormController} from "app/rota/base/baseformcontroller";
import {IBundle, IBaseFormModelFilter, ISaveOptions, IDeleteOptions,
    IValidationItem, IValidationResult, CrudType, ModelStates} from 'app/rota/base/interfaces';
import {ICrudServerResponse} from 'app/rota/services/common.interface';


import {IBooking, IKonteyner} from "./interfaces";
import {IBkgService} from "./bkg.service";
import "./bkg.service";


class BkgGenelBilgilerController extends BaseFormController<IBooking> {
    BkgService: IBkgService;
    constructor(bundle: IBundle) {
        super(bundle);
    }

    getModel(modelFilter: IBaseFormModelFilter): IBooking {
        return this.BkgService.bkgModel;
    }
}

App.addController("bkgGenelBilgilerController", BkgGenelBilgilerController, "BkgService");

開發者ID:jmptrader,項目名稱:RotaTsFramework,代碼行數:24,代碼來源:bkg.genelbilgiler.controller.ts

示例3: constructor

    mytabs: ITab[];
    BkgService: IBkgService;

    constructor(bundle: IBundle) {
        super(bundle);

        this.mytabs = [
            {
                state: 'shell.content.bkg.genelbilgiler'
            }, {
                state: 'shell.content.bkg.konteynerler.liste',
                activeState: 'shell.content.bkg.konteynerler'
            }];
    }

    saveModel(options: ISaveOptions): ng.IPromise<ICrudServerResponse> {
        return this.common.promise();
    }

    deleteModel(options: IDeleteOptions): ng.IPromise<any> {
        return this.common.promise();
    }

    getModel(modelFilter: IBaseFormModelFilter): IBooking {
        return this.BkgService.bkgModel;
    }
}

App.addController("bkgController", BkgController, 'BkgService');

開發者ID:jmptrader,項目名稱:RotaTsFramework,代碼行數:29,代碼來源:bkg.controller.ts

示例4: modalResult

ďťżimport {App} from "app/rota/config/app";
import {BaseModalController} from "app/rota/base/basemodalcontroller";
import {IBaseModelFilter,ModelStates} from 'app/rota/base/interfaces';
import {ICrudServerResponse} from 'app/rota/services/common.interface';

import {ITodoModel} from "./todos.models";
import {ITodoApi} from "./todos.service";

import "./todos.service";

class TodoModalController extends BaseModalController<ITodoModel, ITodoModel> {
    todoApi: ITodoApi;




    modalResult(data: ITodoModel): void {
        if (!data) super.closeModal();
        debugger;
        this.common.setModelState(data, ModelStates.Added);

        super.modalResult(data);

        //this.todoApi.save(data).then((result: ICrudServerResponse) => {
        //    super.modalResult(result.model);
        //});
    }
}

App.addController("todoModalController", TodoModalController, "todoApi");
開發者ID:jmptrader,項目名稱:RotaTsFramework,代碼行數:30,代碼來源:todo.modal.controller.ts


注:本文中的app/rota/config/app.App.addController方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。