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


TypeScript app.App類代碼示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: getTodos

interface ITodoApi extends IBaseApi {
    getTodos(modelFilter?: ITodoFilter): ng.IPromise<ITodoModel[]>;
    getTodoById(id: number): angular.IPromise<ITodoModel>;
    save(model: ITodoModel): ng.IPromise<ICrudServerResponse>;
    deleteById(id: number): ng.IPromise<any>;
}

class TodoApi extends BaseApi implements ITodoApi {

    getTodos(modelFilter?: ITodoFilter): ng.IPromise<ITodoModel[]> {
        return this.post<ITodoModel[]>("todo/getall", modelFilter || {});
    }

    getTodoById(id: number): ng.IPromise<ITodoModel> {
        return this.get<ITodoModel>("todo/getbyid?id=" + id);
    }

    save(model: ITodoModel): ng.IPromise<ICrudServerResponse> {
        return this.post<ICrudServerResponse>('todo/save', model);
    }

    deleteById(id: number): ng.IPromise<any> {
        return this.post('todo/deletebyid?id=' + id);
    }
}
//Register
App.addApi("todoApi", TodoApi);
//Export
export {ITodoApi, TodoApi}
開發者ID:jmptrader,項目名稱:RotaTsFramework,代碼行數:29,代碼來源:todos.service.ts

示例5: 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

示例6: super

        super(bundle);
        this.bkgModel = bkgModel;
    }

    getBkg(): IBooking {
        return this.bkgModel;
    }
    getKonteynerlarByBkgId(bkgId: number): IKonteyner[] {
        return this.bkgModel.konteynerlar;
    }

    getKonteynerById(id: number): IKonteyner {
        return _.findWhere(this.bkgModel.konteynerlar, { id: id });
    }

    saveKonteyner(kontyener: IKonteyner): ng.IPromise<ICrudServerResponse> {
        const copy = angular.copy(kontyener);
        //copy.id = (_.max(this.bkgModel.konteynerlar, (item): number => {
        //    return item.id;
        //}).id || 0) + 1;
        this.bkgModel.konteynerlar.push(copy);
        return this.common.promise<ICrudServerResponse>({
            model: copy
        });
    }
}
//Register
App.addApi("BkgService", BkgService, ['bkg.model']);
//Export
export {BkgService, IBkgService}
開發者ID:jmptrader,項目名稱:RotaTsFramework,代碼行數:30,代碼來源:bkg.service.ts

示例7:

import {App} from "app/rota/config/app";
import {IBooking} from "./interfaces"
import {ModelStates} from "app/rota/base/interfaces"

App.addValue<IBooking>('bkg.model', { konteynerlar: [], id: 0, modelState: ModelStates.Added ,bkgNo:'yeniBooking'});
開發者ID:jmptrader,項目名稱:RotaTsFramework,代碼行數:5,代碼來源:bkg.model.ts


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