编译的下划线JST引用标志下划线未定义错误?

时间:2015-08-07 10:51:19

标签: javascript backbone.js underscore.js browserify underscore.js-templating

我在使用Browserify的Backbone构建中使用已编译的下划线模板。当我引用模板并运行我的代码时,我收到错误Uncaught ReferenceError: _ is not defined,我不完全确定原因,有人可以提出建议吗?

JS

var Backbone = require('backbone'),
    $ = require('jquery'),
    _ = require('underscore'),
    dataStore = require('dataStore'),
    FastDOM = require('fastdom');

require('../templates');

module.exports = Backbone.View.extend({

    className: 'contact-view view transition-toggle is-hidden',

    template: JST['contact.html'],
//...

违反下划线_.escape,Array.prototype.join}with(obj)

0 个答案:

没有答案