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

can/view/autorender doesn't import $.fn.viewModel #1880

Closed
justinbmeyer opened this Issue Sep 3, 2015 · 1 comment

Comments

Projects
None yet
3 participants
@justinbmeyer
Contributor

justinbmeyer commented Sep 3, 2015

Something like the following does not work

<script id="demo" can-autorender type="text/stache">
    <can-import from="bitballs/components/game/details/" />
    <game-details session="{session}"></games-details>
</script>
<script src="../../../node_modules/steal/steal.js" main="@empty">
    import $ from "jquery";
    import Session from "bitballs/models/session";
    import "can/view/autorender/";
    $('#demo').viewModel().attr("session", new Session({user: {isAdmin: true}}))
</script>

Without adding a import 'can/component/';

This is because can/component creates $.fn.viewModel.

The solution is to create another module, probably something like can/util/view_model that is imported by autorender and component.

James0x57 added a commit that referenced this issue Sep 8, 2015

@James0x57 James0x57 added this to the 2.3.0 milestone Sep 17, 2015

James0x57 added a commit that referenced this issue Sep 29, 2015

James0x57 added a commit that referenced this issue Oct 2, 2015

@daffl

This comment has been minimized.

Show comment
Hide comment
@daffl

daffl Oct 2, 2015

Contributor

Closed via #1893

Contributor

daffl commented Oct 2, 2015

Closed via #1893

@daffl daffl closed this Oct 2, 2015

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