| .. | .. |
|---|
| 5 | 5 | import { LicenseTypesService } from '../resources/license_types'; |
|---|
| 6 | 6 | import { LocaleService } from '../common/i18n'; |
|---|
| 7 | 7 | import { TdDialogService } from '@covalent/core'; |
|---|
| 8 | | -import { Component, AfterViewInit } from '@angular/core'; |
|---|
| 8 | +import { Component, AfterViewInit, ViewChild } from '@angular/core'; |
|---|
| 9 | 9 | import { TdMediaService } from '@covalent/core'; |
|---|
| 10 | 10 | import { FormBase, IComboOption } from './base'; |
|---|
| 11 | 11 | import { ActivatedRoute, Router } from '@angular/router'; |
|---|
| .. | .. |
|---|
| 32 | 32 | |
|---|
| 33 | 33 | constructor(private http: Http, |
|---|
| 34 | 34 | private licenseTypes: LicenseTypesService, |
|---|
| 35 | | - private router: Router, |
|---|
| 36 | 35 | private applications: ApplicationsService, |
|---|
| 36 | + router: Router, |
|---|
| 37 | 37 | toaster: ToastsManager, |
|---|
| 38 | 38 | route: ActivatedRoute, |
|---|
| 39 | 39 | $L: LocaleService, |
|---|
| 40 | 40 | dialogs: TdDialogService) { |
|---|
| 41 | | - super($L, route, toaster, applications, $L.get('application'), dialogs); |
|---|
| 41 | + super($L, router, route, toaster, applications, $L.get('application'), dialogs); |
|---|
| 42 | 42 | } |
|---|
| 43 | 43 | |
|---|
| 44 | 44 | |
|---|
| .. | .. |
|---|
| 46 | 46 | this.router.navigate([`applications`]); |
|---|
| 47 | 47 | } |
|---|
| 48 | 48 | |
|---|
| 49 | | - |
|---|
| 50 | | - ngAfterViewInit(): void { |
|---|
| 49 | + init() : void { |
|---|
| 50 | + super.setFirstFocus(); |
|---|
| 51 | + super.reset(); |
|---|
| 51 | 52 | super.prepareInitialData('applicationId', { |
|---|
| 52 | 53 | metadata: [] |
|---|
| 53 | 54 | }); |
|---|
| 54 | 55 | } |
|---|
| 56 | + |
|---|
| 57 | + ngAfterViewInit(): void { |
|---|
| 58 | + this.init(); |
|---|
| 59 | + } |
|---|
| 55 | 60 | } |
|---|
| 56 | 61 | |
|---|