首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >骨干网误差

骨干网误差
EN

Stack Overflow用户
提问于 2013-04-29 20:13:56
回答 1查看 122关注 0票数 0

我正在按主干网开发一个应用程序,但现在也出现了同样的错误:

Uncaught TypeError: Object function (){ parent.apply(this, arguments); } has no method 'match'

当我添加了调用时,这个错误就会出现:

代码语言:javascript
复制
define(["jQuery", "underscore", "Backbone", "Handlebars", "models/person", "views/signupview", "text!templates/loginview.html"], function ($, _, Backbone, Handlebars, Signupview, template) {
    var LoginView = Backbone.View.extend({
        template: Handlebars.compile(template),
        events: {
            "click .sign_up": "signUp_manual"
        },
        initialize: function () {
            this.render();
        },
        render: function () {
            var html = this.template();
            $('#pagina').html(this.$el.html(html)); //appendo ad el);
            return this;
        },
        signUp_manual: function () {
            console.log("signup");
            new Signupview();
        }
        //inserire funzione per log-in
    });
    return LoginView;
});

在这里,签名人:

代码语言:javascript
复制
define(["jQuery", "underscore", "Backbone", "Handlebars", "text!templates/signup.html"], function ($, _, Backbone, Handlebars, template) {
    var Signupview = Backbone.View.extend({
        template: Handlebars.compile(template),
        events: {},
        initialize: function () {
            this.render();
        },
        render: function () {
            var html = this.template();
            $('#pagina').html(this.$el.html(html)); //appendo ad el);
            return this;
        }
    });
    return Signupview;
});
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-11-06 06:56:01

问题就在这条线上

代码语言:javascript
复制
define(["jQuery", "underscore", "Backbone", "Handlebars", "models/person", "views/signupview", "text!templates/loginview.html"], function ($, _, Backbone, Handlebars, PersonModel, Signupview, template) {
    //your code
});

在回调函数中忽略了PersonModel参数

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16287402

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档