element's controller is lost through arg/params usage with substitution #1149

Open
mczepiel opened this Issue Mar 4, 2013 · 2 comments

3 participants

@mczepiel
MontageJS member

MyView template:

<div data-montage-id="contentSubstitution">
    <div data-param="*"></div>
</div>

MyView JS

prepareForDraw: {
    value: function () {
        this.templateObjects.contentSubstitution.switchComponents = this._domArguments;
    }
}

Owner Template using MyView

<div data-montage-id="myView">
    <div data-montage-id="foo" data-arg="foo">Foo Placeholder</div>
    <div data-montage-id="bar" data-arg="bar">Bar Placeholder</div>
</div>

Where foo and bar are previously declared components with templates.

When the owner's template is rendered, switching the content of the substitution inside myView works, but the element that renders is from the Owner's template and has no controller associated with it.

I would expect the element to be associated with the declared component and decorated as such from the related template of either foo or bar.

@aadsm
MontageJS member

I wasn't able to replicate this, I fixed a bunch of bugs today, maybe it was solved in one of those?

@mczepiel mczepiel self-assigned this May 28, 2014
@kriskowal
MontageJS member

Assigned to @mczepiel for verification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment