dox_view 3.0.0
dox_view: ^3.0.0 copied to clipboard
A template engine for the Dox framework, like Edge.js: layouts with components and slots, @if, @each and escaped output in .dox.html files.
3.0.0 #
- The first stable release.
3.0.0-rc.1 #
- Fix:
View.configure()dropped the globals added before it withView.global(). Now it keeps them. The globals of the config win on the same name.
3.0.0-alpha.3 #
ViewProvider(was a DoxService): extend it in your app,shutdown()is optional.
3.0.0-alpha.2 #
- Components and layouts now see the request helpers of
view():request,csrfField(),csrfToken(),errors,old()andsession(). Before, a form inside a layout failed withcan not read "path" of null. ViewEngine.rendertakes a third map,shared: data that components see too.- README: credits to Edge.js.
3.0.0-alpha.1 #
- First version.
- Templates in
.dox.htmlfiles, rendered withview(req, name, data)orView.render(name, data). {{ }}escapes HTML,{{{ }}}does not.{{-- --}}comments.@if,@elseif,@else,@unless,@each(with index, key,$loopand@else),@let,@assign,@includeand@includeIf.- Components with props and slots, for layouts too. A template in
components/is also a tag, like@button(...). - Expressions with fields, math, logic,
??,?:, functions and methods. Objects withtoJson()work, like Dox models. - With a session:
csrfField(),csrfToken(),errors,old()andsession().route()andrequestin every view. - Parsed templates are cached, but not when
APP_ENVisdevelopmentorlocal. - Errors name the template and the line.