我不想在扩展类上访问基类方法

时间:2017-04-06 13:14:43

标签: angular typescript visual-studio-2015

我有两个typscript类。

CodeManagementApi.ts

@QueryHints(value = @QueryHint(name = HINT_FETCH_SIZE, value = "" + Integer.MIN_VALUE))
@Query(value = "select t from Todo t")
Stream<Todo> streamAll();

码management.ts

我不想从code-management.ts文件中访问ajaxHelper方法。我只想访问并查看CodeManagementApi.ts文件。

module Erkyazilim.CodeManagementApi {
    export class Api extends WebApiBase {
        public static list(callbackDone: (res: Model.ResultList<Model.DtoFileManager>) => void, callbackFail: (res: any) => void = null, contentType = 'application/json', opts: JQueryAjaxSettings = null) { 
            //I want access ajaxHelper method only this here.
            super.ajaxHelper(`/api/CodeManagementApi/List`, 'POST', null, callbackDone, callbackFail, contentType, opts); 
        }
    }
}

WebApiAjax.ts

import { Component, OnInit, OnChanges, OnDestroy } from '@angular/core';

@Component({
    selector: 'code-management'
})
export class CodeManagement implements OnInit, OnChanges, OnDestroy {
    _http = Erkyazilim.CodeManagementApi.Api;

    constructor() {

    }

    ngOnInit(): void {
        //I don't want see this here. Only want see and access from CodeManagementApi.ts file
        this._http.ajaxHelper();
    }

    ngOnChanges(changes: Object): void {}

    ngOnDestroy(): void {}    
}

如何解决这个问题?

0 个答案:

没有答案