• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript app.App类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript common.ColorUtil类代码示例发布时间:2022-05-25
下一篇:
TypeScript tasks.selectActiveTasks函数代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap