import { Http } from '@angular/http'; import { ToastsManager } from 'ng2-toastr/ng2-toastr'; import { ApplicationsService } from '../resources/applications'; import { LicenseTypesService } from '../resources/license_types'; import { LocaleService } from '../common/i18n'; import { IPageChangeEvent } from '@covalent/core'; import { Component, AfterViewInit } from '@angular/core'; import { TdMediaService } from '@covalent/core'; import { FormBase, IComboOption } from './base'; import { ActivatedRoute, Router } from '@angular/router'; var app_example = { code: 'CICS', creation_timestamp: 1418384439000, description: 'Wellbore integrity analysis software', id: 1, license_filename: 'config_server.lic', name: 'CurisIntegrity', metadata: [ { key: 'max_docs', value: '250000', readonly: true, mandatory: true } ] } @Component({ selector: 'application-form', templateUrl: 'src/app/forms/application.form.html' }) export class ApplicationFormComponent extends FormBase { fields: any = { 'id': '', 'code': '', 'name': '', 'creation_timestamp': '', 'license_filename': '', 'description': '', 'metadata': '', 'key': '', 'value': '', } constructor(private http: Http, private licenseTypes: LicenseTypesService, private router: Router, private applications: ApplicationsService, toaster: ToastsManager, route: ActivatedRoute, $L: LocaleService) { super($L, route, toaster, applications, $L.get('application')); } goBack(): void { this.router.navigate([`applications`]); } ngAfterViewInit(): void { super.prepareData('applicationId'); } }