Skip to content

Not rendering HeaderView template. #3

Description

@khein

receiving TypeError: 'undefined' is not a function (evaluating 'a.replace(O,function(a){return""+n[a]})') when loading index.html from the underscore.js library.

The backbone-cellar bootstrap website doesn't correctly load the HeaderView template on Safari 5.1.7 & Mac OS X 10.7.4. Didn't work with Firefox or Chrome either, so may just be an OS X issue.

Changed lines 10-12 in js.utils to:

            deferreds.push($.get('tpl/' + view + '.html', function(data) {
                window[view].prototype.template = _.template(data);
            }, "text"));

with the ', "text" being the addition.

This forced the jQuery $.get to recognize the HeaverView.html to be text instead of an [object Document] upon load.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions