Домашно: Creating a Blog with HTML5, JavaScript and Kinvey -Creating a post
Здравейте следвам много внимателно инструкциите от видеото и всичко върви до създаването на нов пост.
По някаква причина не иска да изпълни функцията createNewPost от postController.js
Получавам следната грешка в конзолата:
[Tue Jun 28 2016 00:54:50 GMT+0300 (FLE Daylight Time)] body Plugin Error this._requester.post is not a function TypeError: Plugin Error this._requester.post is not a function
at PostController.createNewPost (http://localhost:63342/BlogWithCustomFramework/scripts/controllers/postController.js:14:25)
at Object.<anonymous> (http://localhost:63342/BlogWithCustomFramework/scripts/app.js:81:24)
at HTMLBodyElement.listener_callback (http://localhost:63342/BlogWithCustomFramework/scripts/libs/sammy.js:698:18)
at HTMLBodyElement.dispatch (http://localhost:63342/BlogWithCustomFramework/scripts/libs/jquery.min.js:3:6444)
at HTMLBodyElement.r.handle (http://localhost:63342/BlogWithCustomFramework/scripts/libs/jquery.min.js:3:3219)
at Object.trigger (http://localhost:63342/BlogWithCustomFramework/scripts/libs/jquery.min.js:3:5552)
at HTMLBodyElement.<anonymous> (http://localhost:63342/BlogWithCustomFramework/scripts/libs/jquery.min.js:3:11520)
at Function.each (http://localhost:63342/BlogWithCustomFramework/scripts/libs/jquery.min.js:2:2882)
at n.each (http://localhost:63342/BlogWithCustomFramework/scripts/libs/jquery.min.js:2:847)
at n.trigger (http://localhost:63342/BlogWithCustomFramework/scripts/libs/jquery.min.js:3:11496)
Ето моя postController.js
class PostController{
constructor(postView, requester, baseUrl, appKey){
this._postView = postView;
this._requester = requester;
this._appKey = appKey;
this._baseServiceUrl = baseUrl + "/appdata/" + appKey + "/posts/";
}
showCreatePostPage(fullName, isLoggedIn){
this._postView.showCreatePostPage(fullName, isLoggedIn);
}
createNewPost(data){
this._requester.post(this._baseServiceUrl, data, function (responseData) {
showPopup('success', 'Napravi si post');
redirectUrl('#/')
}, function (responseData) {
showPopup('error', 'neshto greshno stana');
})
}
}
Ето и целия проект
http://dox.bg/files/dw?a=a93f62770c
Някакви идеи къде да проверя за други грешки?
God Bless you Mr. Jinjaar!
Тръгна. Досега дебнех запетайки, скоби, променливи, минах и през инстанцията и ми се стори че е наред и повече никога не се върнах там.