const Observable = require('data/observable').Observable;

const pageData = new Observable({
    greeting: 'Hello World'
});

function pageLoaded(args) {
    const page = args.object;
    page.bindingContext = pageData;

    setTimeout(() => {
        pageData.greeting = 'Hello Peter';
    }, 2000);
}

module.exports = {
    pageLoaded
}