-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.ts
executable file
·70 lines (55 loc) · 2.09 KB
/
app.ts
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import 'reflect-metadata';
import { Component, provide } from '@angular/core';
import { bootstrap } from 'angular2-meteor-auto-bootstrap';
import { disableDeprecatedForms, provideForms} from '@angular/forms'
import { provideRouter, RouterConfig, ROUTER_DIRECTIVES } from '@angular/router';
import { APP_BASE_HREF } from '@angular/common';
// shared components
import { TopNavComponent} from './imports/shared/top-nav/top-nav.ts';
import { SidebarLeftComponent} from './imports/shared/sidebar-left/sidebar-left.ts';
import { SidebarRightComponent} from './imports/shared/sidebar-right/sidebar-right.ts';
// job
import { JobsComponent } from './imports/job/jobs.ts';
import { JobComponent } from './imports/job/job.ts';
import { JobFormComponent } from './imports/job/job-form.ts';
// entity
import { EntityComponent } from './imports/entity/entity.ts';
// versions
import { VersionsComponent } from './imports/version/versions.ts';
// users
import { UsersComponent } from './imports/user/users.ts';
// review
import { ReviewComponent } from './imports/review/review';
// shared service
import { SharedService } from './imports/shared/shared.service';
import { JobSharedService } from './imports/shared/job-shared.service';
@Component({
selector: 'app',
templateUrl: '/client/app.html',
directives: [ TopNavComponent,
SidebarLeftComponent,
SidebarRightComponent,
ROUTER_DIRECTIVES ]
})
class Pipe {}
const routes: RouterConfig = [
{ path: '', component: JobsComponent },
{ path: 'job/:jobId', component: JobComponent },
{ path: 'jobForm', component: JobFormComponent },
{ path: 'entity/:entityId', component: EntityComponent },
{ path: 'users', component: UsersComponent },
{ path: 'user/:userId', component: UsersComponent },
{ path: 'review/:versionId', component: ReviewComponent }
];
const APP_ROUTER_PROVIDERS = [
provideRouter(routes)
];
bootstrap(Pipe, [
SharedService,
JobSharedService,
APP_ROUTER_PROVIDERS,
disableDeprecatedForms(),
provideForms(),
provide(APP_BASE_HREF, { useValue: '/' })
])
.catch((err: any) => console.error(err));