Skip to content

Underscore templating issue #17

@jaredshaunsmith

Description

@jaredshaunsmith

storyTemplate: _.template( $('#story-item-template').html() ),

see this post for a good explanation of how to use underscore templating: https://www.bennadel.com/blog/2411-using-underscore-js-templates-to-render-html-partials.htm

also, use the passed in $template when we instantiated the new module. that's why we pass it in. so instead of $('#story-item-template').html() here you will use the pre-cached this.$template.html() - or even better, when assigning $template to this.$template go ahead and grab the html() then on line 10, then your call would just be this.$template

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions