Skip to content

Events are not binding with dynamic import in meteor 1.5 #8

@WayneUong

Description

@WayneUong

This is how I set it up in /client/index.js

FlowRouter.wait();
import('/imports/client/main.js').then(function () {
    FlowRouter.initialize();
});

In /imports/client/main.js:

import './test.html'

Template.test.events({
    test: function () {
        console.log('click')
    }
})

FlowRouter.route('/', {
    action: function () {
        BlazeLayout.render('test');
    }
});

In /imports/client/main.html:

<template name="test">

    <button onclick={{test}}>test</button>

</template>

The onclick event binding does not work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions