malomalo / viking

Viking.js
vikingjs.org
MIT License
4 stars 5 forks source link

Add globals as a static of application #121

Closed bemky closed 6 months ago

bemky commented 6 months ago

Support applications having static global to define properties passed to each view on display.

class App extends Application {
    static globals = app => {
        return { app }
    }
}
malomalo commented 6 months ago

Should we call these helpers instead of globals ala Rails?

malomalo commented 6 months ago

And should / how would application be set on globals ...

bemky commented 6 months ago

I'm going to remove this in favor of PR for layouts. Decided to suggest we move away from initializing view in display.