totaljs / framework

Node.js framework
http://www.totaljs.com
Other
4.36k stars 450 forks source link

is it possible to use F.config in view engine ? #734

Closed aalfiann closed 5 years ago

aalfiann commented 5 years ago

I have expected that I could use @{config('name')}, but it doesn't work.

I know i could just put from controller.view('index',{config:F.config}), but I'm too lazy for this, because I have many routes.

Is there another way?

petersirka commented 5 years ago

Yes and you can't use config as a model:

So you can use: @{CONF.key} or @{'%key'}