const $ = global; new $.Page({ data: { }, onLoad() { this.init(); }, init() { $.request('products', 'GET', {}).then((res) => { }); } });