1.

What Is A Use Of Templates In Knockout And How Are They Coded ?

Answer»

Knockout allows us to use the data-bind concept to hook into user control object events such as ‘click’. To do this, Templates can provide different blocks of mark-up to be used for different view renderings. For EXAMPLE, to show mark-up with a required ‘STATEFIELD for a US address, and a required ‘Town’ field for say a UK address. Mark-up for templates can be IMPLEMENTED using an external template view-engine, or by implementing the html inside a pseudo JavaScript block.

Knockout allows us to use the data-bind concept to hook into user control object events such as ‘click’. To do this, Templates can provide different blocks of mark-up to be used for different view renderings. For example, to show mark-up with a required ‘State’ field for a US address, and a required ‘Town’ field for say a UK address. Mark-up for templates can be implemented using an external template view-engine, or by implementing the html inside a pseudo JavaScript block.



Discussion

No Comment Found