本文整理汇总了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");
示例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");
示例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');
示例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");