rsanchez
2017-03-20 470182be4f955a1c11d912743ce9e683ac4902a5
securis/src/main/webapp/src/app/forms/application.form.component.ts
....@@ -5,7 +5,7 @@
55 import { LicenseTypesService } from '../resources/license_types';
66 import { LocaleService } from '../common/i18n';
77 import { TdDialogService } from '@covalent/core';
8
-import { Component, AfterViewInit } from '@angular/core';
8
+import { Component, AfterViewInit, ViewChild } from '@angular/core';
99 import { TdMediaService } from '@covalent/core';
1010 import { FormBase, IComboOption } from './base';
1111 import { ActivatedRoute, Router } from '@angular/router';
....@@ -32,13 +32,13 @@
3232
3333 constructor(private http: Http,
3434 private licenseTypes: LicenseTypesService,
35
- private router: Router,
3635 private applications: ApplicationsService,
36
+ router: Router,
3737 toaster: ToastsManager,
3838 route: ActivatedRoute,
3939 $L: LocaleService,
4040 dialogs: TdDialogService) {
41
- super($L, route, toaster, applications, $L.get('application'), dialogs);
41
+ super($L, router, route, toaster, applications, $L.get('application'), dialogs);
4242 }
4343
4444
....@@ -46,11 +46,16 @@
4646 this.router.navigate([`applications`]);
4747 }
4848
49
-
50
- ngAfterViewInit(): void {
49
+ init() : void {
50
+ super.setFirstFocus();
51
+ super.reset();
5152 super.prepareInitialData('applicationId', {
5253 metadata: []
5354 });
5455 }
56
+
57
+ ngAfterViewInit(): void {
58
+ this.init();
59
+ }
5560 }
5661