app
Elements inside o-app — including those within the shadow DOM of an o-page nested inside o-app, or any deeper descendant components — have their app property pointing to the o-app element instance.
Below is an example demonstrating how to access the app property within elements inside o-app:
// Application home page address
export const home = "./home.html";
// Available methods on the application
export const proto = {
getSomeData(){
return "Hello ofa.js App Demo";
}
};
// Page transition animation configuration
export const pageAnime = {
current: {
opacity: 1,
transform: "translate(0, 0)",
},
next: {
opacity: 0,
transform: "translate(30px, 0)",
},
previous: {
opacity: 0,
transform: "translate(-30px, 0)",
},
};
{{val}}
✨ {{val}} ✨