Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing error message when the default body attribute not provided #232

Open
PK1A opened this issue Jul 8, 2014 · 0 comments
Open

Confusing error message when the default body attribute not provided #232

PK1A opened this issue Jul 8, 2014 · 0 comments
Labels

Comments

@PK1A
Copy link
Contributor

PK1A commented Jul 8, 2014

Consider this component definition:

var CollapseCpt = function () {
    this.show = true;
    this.toggleShow = function () {
        this.show = !this.show;
    };
};

CollapseCpt.prototype.attributes = {
    title: {type: "string", binding: "1-way"},
    type: {type: "string", binding: "1-way"},
    "body":{type:"template",defaultContent:true}
};

and the example usage (notice empty body):

<#collapse title="Evolution of Online and Offline Bookings" type="Chart">
</#collapse>

As of today this results in the following error message:

[error] [Component: #ctrl.body] Invalid component reference

The error is confusing as it doesn't provide any clue on what is actually wrong. But more importantly this scenario shouldn't fail, IMO.

@benouat benouat added the bug label Jul 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants