rsanchez
2017-03-20 470182be4f955a1c11d912743ce9e683ac4902a5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { Http } from '@angular/http';
import { ToastsManager } from 'ng2-toastr/ng2-toastr';
import { ApplicationsService } from '../resources/applications';
import { UsersService } from '../resources/users';
import { LocaleService } from '../common/i18n';
import { TdDialogService } from '@covalent/core';
import { Component, AfterViewInit, ViewChild } from '@angular/core';
import { TdMediaService } from '@covalent/core';
import { FormBase, IComboOption } from './base';
import { ActivatedRoute, Router } from '@angular/router';
var app_example = { 
}
@Component({
  selector: 'user-form',
  templateUrl: 'src/app/forms/user.form.html'
})
export class UserFormComponent extends FormBase {
  constructor(private http: Http,
              private users: UsersService,
              private applications: ApplicationsService,
              router: Router,
              toaster: ToastsManager,
              route: ActivatedRoute,              
              $L: LocaleService,
              dialogs: TdDialogService) {
    super($L, router, route, toaster, users, $L.get('user'), dialogs);
  }
 
  goBack(): void {
    this.router.navigate([`users`]);
  }
  init() : void {
    super.setFirstFocus();
    super.reset();
    super.prepareInitialData('userId', {
      metadata: []
    });
  }
 
  ngAfterViewInit(): void {
    this.init();
  }
}