You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

18 lines
596 B

/** @odoo-module **/
import { jsonrpc } from "@web/core/network/rpc_service";
import publicWidget from "@web/legacy/js/public/public_widget";
import animations from "@website/js/content/snippets.animation";
publicWidget.registry.Popular = animations.Animation.extend({
// To extend public widget
selector: '.most-popular',
start: async function () {
// To get data from controller.
var self = this;
await jsonrpc('/get_popular_product', {}).then(function(data) {
if(data){
self.$target.html(data)
}
})
}
})