I knew there is a lot of articles about this theme, but I wanna know about my code, why this.getNewsFeedLook()
Is it not a function?
define(["jquery"], function ($) {
let objectNews = {
title: undefined,
type: undefined,
img: undefined,
link: undefined,
content: undefined,
newsFeedLook: this.getNewsFeedLook(),
getNewsFeedLook: function () {
let html = "" +
"<div class='col-xl-3 col-lg-4 col-md-6 col-sm-6 col-12'>" +
" <div class='newsbox'>" +
" <a href='" + this.link + "'>" +
" <img src='" + this.img + "'>" +
" <div class='dark_folie'>" +
" <p>" + this.title + "</p>" +
" <span>" + this.type + "</span>" +
"</div></a></div></div>";
return html;
},
};
return objectNews;
});