JsRender getting started _ javascript tips-js tutorials

Source: Internet
Author: User
This article mainly introduces the practical example of JsRender, including knowledge points such as tagelse usage and cyclically nested access to parent-level data, and provides complete instance download, which is of great practical value, for more information about how to use tag else and cyclically nested access to parent-level data, see this document. Share it with you for your reference. The details are as follows:

Preface

JsRender is a jQuery-based JavaScript template engine with the following features:

· Simple and intuitive

· Powerful functions

· Scalable

· Lightning fast

These features seem very powerful, but almost every template engine will do so...

This template engine is available only when you need to work. After using it for a while, I found that it is indeed quite powerful. However, it is hard to understand that it is too powerful in some places.

On the other hand, JsRender's official documents are relatively detailed, but there are surprisingly few other materials. If you encounter any problems, you cannot find them. Not only are you unable to find relevant questions, but there are almost no results.

In addition, JsRender is hard to understand in some places, so we urgently need to share some "best practices ".

Based on the recent usage, I have summarized some practical experiences. Of course, these experiences cannot be found in official documents.

Nested loop use # parent access to parent-level data (not recommended)

The Code is as follows:





Use nested loops # Use parent to access parent data --- by Yang Yuan

















Serial number Name Family Members



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.