Slide 20
Slide 20 text
this.updatePage = function(e, data, isPopState) {
this.trigger('uiBeforePageChanged', data);
var html = data.page;
this.$node.find(data.init_data.viewContainer).html(html);
using(data.module, function(page) {
page(data.init_data);
this.trigger('uiPageChanged', data);
}.bind(this));
};
this.on('dataPageRefresh', this.updatePage);
The UI component replaces the HTML for the content view and subsequently fetches and initializes the required JavaScript
components for that URL. Lastly, the UI component triggers the “uiPageChanged” event so that other components are aware that
the navigation to a new page is complete.