Configs
Config example
const app = new App({
fields: Fields,
helper: function() {
// The Helpers of your choice will be passed to the controllers, views and components
return {
yourHelper1: {},
yourHelper2: {}
};
},
ready: function(builder, observer) {
//const inst = this; // Stratox main instance
},
request: { // Enable Ajax
dataType: "json",
url: "https://example.se/backend-location/",
path: '/api',
startPath: "home",
config: {
headers: {
'Accept': 'application/json'
}
},
get: function(searchParams) {
searchParams.append("param", 1);
return searchParams;
},
post: function(object) {
object.param = 1;
return object;
}
}
});fields
helper
ready
request (Fetch API library / ajax)
Last updated