Help! Render html + typescript into template of meteor


#1

Hi,
I’m using Meteor + Angular2 + Typescript + FlowRouter + FlowLayout. When login success, it render home page, but not render parties-list.ng.html. F5 again, it work. Please help me, thanks all!
This is my code

// file index.html
<body>
    {{> main }}
</body>
<template name="main">
    {{> Template.dynamic template=main}}
</template>
<template name="home">
    <nav>
        <a href="/">Home</a>
        <a href="/logout">Logout</a>
    </nav>
    <parties-list></parties-list>
    <script>System.import('client/parties-list');</script>
</template>
// file router.js
FlowRouter.route('/', {
    name: 'home',
    action: function() {
        Tracker.autorun(function() {
            if (!Meteor.userId()) {
                FlowRouter.go('/login');
            } else {
                FlowLayout.render('main', { main: 'home' });
            }
        });
    }
});
// file parties-list.ts
import {Component, View, bootstrap, For, If} from 'angular2/angular2';

@Component({
    selector: 'parties-list'
})
@View({
    templateUrl: 'client/parties-list.ng.html',
    directives: [For, If]
})
class PartiesList {
    constructor() {}
bootstrap(PartiesList);