Blogs - tagged "mustache"
Visit Wordpress

Partials & Utils in Handlebars

Posted on May 18, 2015


PARTIALS Let’s say we have a structure like the following : data = { students : [{ name : ‘ABC’, roll : 1 }, { name : ‘DEF’, roll : 2 }, { name : ‘GHI’, roll : 3 }], subject : [{ name : “Programming in C”, credits : 4 }, { name : […]


Read More

Block Helpers [Built-in & Custom]

Posted on March 22, 2015


In the last post, we discussed blocks and contexts. We used {{#each}} in that post, known as “Each Block Helper“. So, what is a block helper? Block helpers make it possible to define custom iterators and other functionality that can invoke the passed block with a new context. [Handlebars Docs] Handlebars give us some built-in […]


Read More

Blocks & Contexts in Handlebars

Posted on January 12, 2015


A block in handlebars.js is same as any other language – it’s a section of code that is grouped and placed together. To start a block we have to prepend a “#“. => {{#Block}} To end a block we have to prepend a “/“. => {{#Block}} There are some pre-defined Block Helpers available in Handlebars. […]


Read More

Handlebars – Basic Syntax

Posted on November 19, 2014


In this blog we are going to look into basic syntax for writing handlebar templates. There are 4 steps you need to follow 1. Include jQuery and Handlebars library to your HTML file 2. Define your template. 3. Compiling template into a function, pass data to function and appending it to required HTML element Include jQuery and […]


Read More

Handlebars.js An Overview

Posted on October 12, 2014


In my last blog we understood the importance of Client Side Templating. In this blog I am going to explain the basics of Handlebars.js. Lets get started. Handlebars.js was started by Yehuda Katz. It is built upon mustache, which is logic-less. Logic-less here means that there are no logical statements (If-else,switch etc) but in mustache […]


Read More

Search

  Recent Tips

See All »

  Recent Seminars

  • PHP 8 - Features

    PHP 8 has been officially released in November 2020! This new major update brings many optimizations and powerful features to the language. This...

  • ProxySQL

    ProxySQL is a high-performance SQL proxy. ProxySQL runs as a daemon watched by a monitoring process. The process monitors the daemon and restarts i...

  • Unix Commands & Shell Scripts to help save our time

    Time is important. We should not waste it doing trivial things. Automate things wherever possible.

See All »