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