Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Extending components content problem.

$
0
0
Hello, i'm trying to create extended version of the component by wrapping in to extended version:

Here is the code, some-feature has inside content and is expected it to be filled with something, then there is another extended-feature component that fills some-feature with additional content, and more-extended version that is supposed to extend some-feature content even more. 
  1. can.Component({
  2.     tag: 'more-extended-feature',
  3.     template: '<extended-feature><div>here is more</div></extended-feature>'
  4. })

  5. can.Component({
  6.     tag: 'extended-feature',
  7.     template: '<some-feature><div>extended: <content></content></div></some-feature>'
  8.     //template: '<div>extended: <content></content></div>'
  9. })

  10. can.Component({
  11.     tag: 'some-feature',
  12.     template: 'feature: <content></content>'
  13. })

  14. $('body').append(can.view.mustache('<more-extended-feature></more-extended-feature>')())

But there is a Maximum call stack size exceeded error happens while inserting, you can see that in fiddle.


Does this supposed to work?

Viewing all articles
Browse latest Browse all 3491

Trending Articles