import { Component, FormView, Model } from "../../../src/core"; import { HeroNameCollection } from "../Collection/HeroName"; import { HeroPowerCollection } from "../Collection/HeroPower"; @Component({ el: "ng-hero", events: { "submit form": "onSubmitForm" }, collections: { names: new HeroNameCollection(), powers: new HeroPowerCollection() }, template: `
` }) export class HeroView extends FormView { el: HTMLElement; collections: NgBackbone.CollectionMap; initialize() { this.collections.get( "powers" ).fetch(); this.collections.get( "names" ).fetch(); this.render(); } onSubmitForm( e:Event ){ let el =