Coder Social home page Coder Social logo

Comments (11)

tj avatar tj commented on June 3, 2024

basically a partial?

from ejs.

wavded avatar wavded commented on June 3, 2024

yes, more or less

from ejs.

puro avatar puro commented on June 3, 2024

Would be great, I do agree.

from ejs.

tj avatar tj commented on June 3, 2024

what is wrong with just using partials from whatever view system? we could have an include type thing to statically compile them together but it would not function as a partial really

from ejs.

wavded avatar wavded commented on June 3, 2024

i'll have to think on that... I'm used to the include system in PHP/JSP so using a "view system" is a little foreign...

from ejs.

rcmachado avatar rcmachado commented on June 3, 2024

Hm, i like the idea to have an include that statically compile the code. Maybe we could have two functions: one to include statically and other that functions like a require (just call other template).

from ejs.

tj avatar tj commented on June 3, 2024

I guess I just dont really get the point :p its not meant to serve as all the logic like php, it is just meant to function as a template language

from ejs.

rcmachado avatar rcmachado commented on June 3, 2024

Maybe to include a "header.ejs" file? :) Or maybe there's a better way to do this? (I really don't know, I came from PHP world too :) )

from ejs.

tj avatar tj commented on June 3, 2024

you could have headers and footers (in express for example) by just doing:

<%- partial('header') %>

from ejs.

wavded avatar wavded commented on June 3, 2024

I'll have to get back to you on this. I think this may be simply my coming from a JSP PHP world and not a Ruby one. Once I get the hang of tools like Express I may not have this need anymore. Thanks for your feedback.

from ejs.

tj avatar tj commented on June 3, 2024

np, will close for now :)

from ejs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.