angular - I don't want access base class methods on extends class -
i have 2 typscript classes.
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 here. super.ajaxhelper(`/api/codemanagementapi/list`, 'post', null, callbackdone, callbackfail, contenttype, opts); } } } code-management.ts
i don't want access ajaxhelper method code-management.ts file. want access , see codemanagementapi.ts file.
import { component, oninit, onchanges, ondestroy } '@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 here. want see , access codemanagementapi.ts file this._http.ajaxhelper(); } ngonchanges(changes: object): void {} ngondestroy(): void {} } webapiajax.ts
module erkyazilim { export class webapibase { protected static ajaxhelper<tmodel, tresult>(address: string, type: 'post' | 'get' | 'put' | 'patch' | 'delete', model: tmodel, callbackdone: (res: tresult) => void, callbackfail: (res) => void, contenttype: string, opts: jqueryajaxsettings) { //... } } } how solve problem?
Comments
Post a Comment