diff options
Diffstat (limited to 'client/src/app/admin/users')
4 files changed, 6 insertions, 15 deletions
diff --git a/client/src/app/admin/users/user-add/user-add.component.ts b/client/src/app/admin/users/user-add/user-add.component.ts index 8dd98cc5c..e3f4b2e1a 100644 --- a/client/src/app/admin/users/user-add/user-add.component.ts +++ b/client/src/app/admin/users/user-add/user-add.component.ts | |||
@@ -1,14 +1,12 @@ | |||
1 | import { Validators } from '@angular/common'; | ||
2 | import { Component, OnInit } from '@angular/core'; | 1 | import { Component, OnInit } from '@angular/core'; |
3 | import { FormGroup, FormControl, REACTIVE_FORM_DIRECTIVES } from '@angular/forms'; | 2 | import { FormGroup, FormControl, Validators } from '@angular/forms'; |
4 | import { Router } from '@angular/router'; | 3 | import { Router } from '@angular/router'; |
5 | 4 | ||
6 | import { UserService } from '../shared'; | 5 | import { UserService } from '../shared'; |
7 | 6 | ||
8 | @Component({ | 7 | @Component({ |
9 | selector: 'my-user-add', | 8 | selector: 'my-user-add', |
10 | template: require('./user-add.component.html'), | 9 | template: require('./user-add.component.html') |
11 | directives: [ REACTIVE_FORM_DIRECTIVES ] | ||
12 | }) | 10 | }) |
13 | export class UserAddComponent implements OnInit { | 11 | export class UserAddComponent implements OnInit { |
14 | userAddForm: FormGroup; | 12 | userAddForm: FormGroup; |
diff --git a/client/src/app/admin/users/user-list/user-list.component.ts b/client/src/app/admin/users/user-list/user-list.component.ts index c89a61bca..d3827eb28 100644 --- a/client/src/app/admin/users/user-list/user-list.component.ts +++ b/client/src/app/admin/users/user-list/user-list.component.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import { Component, OnInit } from '@angular/core'; | 1 | import { Component, OnInit } from '@angular/core'; |
2 | import { ROUTER_DIRECTIVES } from '@angular/router'; | ||
3 | 2 | ||
4 | import { User } from '../../../shared'; | 3 | import { User } from '../../../shared'; |
5 | import { UserService } from '../shared'; | 4 | import { UserService } from '../shared'; |
@@ -7,8 +6,7 @@ import { UserService } from '../shared'; | |||
7 | @Component({ | 6 | @Component({ |
8 | selector: 'my-user-list', | 7 | selector: 'my-user-list', |
9 | template: require('./user-list.component.html'), | 8 | template: require('./user-list.component.html'), |
10 | styles: [ require('./user-list.component.scss') ], | 9 | styles: [ require('./user-list.component.scss') ] |
11 | directives: [ ROUTER_DIRECTIVES ] | ||
12 | }) | 10 | }) |
13 | export class UserListComponent implements OnInit { | 11 | export class UserListComponent implements OnInit { |
14 | totalUsers: number; | 12 | totalUsers: number; |
diff --git a/client/src/app/admin/users/users.component.ts b/client/src/app/admin/users/users.component.ts index 46aa0862f..37e3b158d 100644 --- a/client/src/app/admin/users/users.component.ts +++ b/client/src/app/admin/users/users.component.ts | |||
@@ -1,12 +1,7 @@ | |||
1 | import { Component } from '@angular/core'; | 1 | import { Component } from '@angular/core'; |
2 | import { ROUTER_DIRECTIVES } from '@angular/router'; | ||
3 | |||
4 | import { UserService } from './shared'; | ||
5 | 2 | ||
6 | @Component({ | 3 | @Component({ |
7 | template: '<router-outlet></router-outlet>', | 4 | template: '<router-outlet></router-outlet>' |
8 | directives: [ ROUTER_DIRECTIVES ], | ||
9 | providers: [ UserService ] | ||
10 | }) | 5 | }) |
11 | 6 | ||
12 | export class UsersComponent { | 7 | export class UsersComponent { |
diff --git a/client/src/app/admin/users/users.routes.ts b/client/src/app/admin/users/users.routes.ts index 0457c3843..eb71bd0ae 100644 --- a/client/src/app/admin/users/users.routes.ts +++ b/client/src/app/admin/users/users.routes.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import { RouterConfig } from '@angular/router'; | 1 | import { Routes } from '@angular/router'; |
2 | 2 | ||
3 | import { UsersComponent } from './users.component'; | 3 | import { UsersComponent } from './users.component'; |
4 | import { UserAddComponent } from './user-add'; | 4 | import { UserAddComponent } from './user-add'; |
5 | import { UserListComponent } from './user-list'; | 5 | import { UserListComponent } from './user-list'; |
6 | 6 | ||
7 | export const UsersRoutes: RouterConfig = [ | 7 | export const UsersRoutes: Routes = [ |
8 | { | 8 | { |
9 | path: 'users', | 9 | path: 'users', |
10 | component: UsersComponent, | 10 | component: UsersComponent, |