Introduction

The Page component is similar to a ServiceNow widget, and like a widget, it has four main components:

The "Server Script" This is the server side script that will provide the data to the page.

(function (params) {

    function initialize() {
        let model = {
            condition: true
        };
        return model;
    }

    return {
        initialize: initialize,
    };

})(params);

The "Client Script" This is the client side script that will provide the logic to the page.

function execute(helpers){
    function myFunction(){
        return 'Hello World!';
    }

    return {
        myFunction: myFunction
    };
}

The "Template" This is the HTML template that will be used to display the page. The template support AlpineJS for dynamic content and reactivity.

The "CSS" This is the CSS code that will be used to style the page. The css is encapsulated in the page component and will not be applied to other pages.