Created
December 9, 2016 09:53
-
-
Save movis08/35a3a563e3cb8c716bda4e8586bf884e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
constructor(data: any, | |
ajaxSettings: { | |
type?: string, | |
url?: string, | |
dataType?: string, | |
contentType?: string | |
}, | |
callbacks?:{ | |
onBeforeDataLoad?: () => void, | |
onDataLoadSuccess?: () => void, | |
onDataLoadError?: () => void, | |
onAfterDataLoad?: () => void | |
}) { | |
//Сохранение callback функций | |
if (callbacks) { | |
this.onBeforeDataLoad = callbacks.onBeforeDataLoad; | |
this.onDataLoadSuccess = callbacks.onDataLoadSuccess; | |
this.onDataLoadError = callbacks.onDataLoadError; | |
this.onAfterDataLoad = callbacks.onAfterDataLoad; | |
} | |
//Установка настроек ajax | |
this.ajaxSettings = ajaxSettings; | |
//Установка первоначальных данных | |
this.data = data; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment