import { Component } from '@angular/core'; import * as modelService from "./model.service" //---------------------------------- // Component for {{name}} // created with Magic code generator //---------------------------------- @Component ({ selector: '{{name}}-form', template: ` {{#each model}} {{#xif "this.type == Boolean"}} {{/xif}} {{#xif "this.type == String"}} {{/xif}} {{#xif "this.type == Number"}} {{/xif}} {{/each}} ` }) export class {{name}}Form { private model : {{tsClassPropertyName this.name}}Model public constructorconstructor(private model: modelService) { this.model = new {{tsClassPropertyName this.name}}Model; } public submit() { console.dump({{tsClassPropertyName this.name}}Model + "\r\n" + this.model); } }