Question

I'm currently working through a geddy tutorial and came across a line of code:

<%- partial('form', {step: {}, toDos: toDos}) %>

What does partial mean? I've done a google search without much insight. I'm guessing it means that you partially load the content so the page loads faster?

Any explanations or helpful links would be appreciated.

http://geddyjs.org/tutorial

It's been a while since I've coded so if I should be looking at a particular method of coding (e.g. OOP, MVC) that I'm missing let me know.

Was it helpful?

Solution

I received this answer by Dan Craciun on experts exchange which answers it for me:

In geddy, a partial (denoted by a _ in front of the name) is a reusable file/template, that is meant to be used in more than one template. It helps share code between different templates.

See here for a longer explanation (about half page, "An intro to partials"): http://code.tutsplus.com/tutorials/creating-a-todo-list-app-with-nodejs-and-geddy--net-24535

HTH, Dan

OTHER TIPS

I am not sure, but in Symfony - partials are used in case that you have the some template, but there is a part that may be changed later (for example if you have the heading part of your html page, but the title will be different depending on what type of page it is).

So in order to keep the entire template and not break it into 2 parts, there are partials.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top