nullfirm / hjs Goto Github PK
View Code? Open in Web Editor NEWHogan.js NPM package for express 3.x (hjs)
License: Apache License 2.0
Hogan.js NPM package for express 3.x (hjs)
License: Apache License 2.0
I initially raised this against expressjs, but the guys there indicate it might be a problem with hjs - expressjs/express#1833
The problem is that expressjs makes res.locals available to view engines as a function, so given locals like { name: "steve" }, simply writing {{name}} in a hjs template does not produce the expected result. Possibly I could invoke it as a lambda? I'm not sure - i'm new to this - but even if I could that's inconvenient (and libraries like connect-cachify don't work because of this problem).
# lib/express.js
renderPartials p, options
the missing options
cause fcompile
failed to cache partials, which made a huge impact on Node.js io & QPS performace if you have several partials
I'm using hjs with node and express with angular as font end framework. Curly binding syntax of angular doesn't work with hjs. For eg.
<span>{{ something_present_in_$scope }}<span> --> this doesn't work
<span ng-bind="something_present_in_$scope"><span> --> this works
Still don't know whether i should raise this issue with angular or hjs, but it would be really helpful if you can look into this.
Thanks
Make it possible to change delimiters to something else.
{{ }} is reserved by AngularJS.
Perhaps an API similar to this:
server.set('view options', {oTag: '<%', cTag: '%>'};
Hello,
Thank you for the beautiful module.
I have one complain though, partials seem to work fine when used in render but doesn't work for "every page"
app.set('partials', {footer: 'footer'});
Partials within templates don't seem to render using:
template.hjs
Hello world
{{>test_partial}}
test_partial.hjs
This is a test
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.