import {Component, Inject} from '@angular/core';
import {MatDialogRef, MAT_DIALOG_DATA} from '@angular/material'
import {User} from "./user";

@Component({
    selector: 'add-user.component',
    templateUrl: 'add-user.component.html',
})
export class AddUserComponent {
    constructor(
        public dialogRef: MatDialogRef<AddUserComponent>,
        @Inject(MAT_DIALOG_DATA) public data: {user: User}) {
    }

    onNoClick(): void {
        this.dialogRef.close();
    }
}

import {Component, Inject} from '@angular/core';
import {MatDialogRef, MAT_DIALOG_DATA} from '@angular/material'
import {UserListService} from "./user-list.service";
import {User} from "./user";


@Component({
    selector: 'add-user.component',
    templateUrl: 'add-user.component.html',
})
export class AddUserComponent {
    public newUserName:string;
    public newUserAge: number;
    public newUserCompany: string;
    public newUserEmail: string;
    private userAddSuccess : Boolean = false;

    public users: User[];

    constructor(public userListService: UserListService,
        public dialogRef: MatDialogRef<AddUserComponent>,
        @Inject(MAT_DIALOG_DATA) public data: {user: User}) {
    }

    onNoClick(): void {
        this.dialogRef.close();
    }
}

--- 
+++ 
@@ -1,23 +1,13 @@
 import {Component, Inject} from '@angular/core';
 import {MatDialogRef, MAT_DIALOG_DATA} from '@angular/material'
-import {UserListService} from "./user-list.service";
 import {User} from "./user";
-
 
 @Component({
     selector: 'add-user.component',
     templateUrl: 'add-user.component.html',
 })
 export class AddUserComponent {
-    public newUserName:string;
-    public newUserAge: number;
-    public newUserCompany: string;
-    public newUserEmail: string;
-    private userAddSuccess : Boolean = false;
-
-    public users: User[];
-
-    constructor(public userListService: UserListService,
+    constructor(
         public dialogRef: MatDialogRef<AddUserComponent>,
         @Inject(MAT_DIALOG_DATA) public data: {user: User}) {
     }
Clean out unused pieces in `AddUserComponent`

There was a lot of cruft that accumulated in `AddUserComponent`, and
this cleans that up a bit.
