Skip to content

Commit 736a7d5

Browse files
committed
Refatoração de estrutura.
1 parent d1d7552 commit 736a7d5

33 files changed

+23
-24
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protrac
2626

2727
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
2828

29-
404
3029
users page
3130
toast
3231
HttpErroHandling

src/app/app.module.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,28 @@ import { HttpClientModule } from '@angular/common/http';
55

66
import { AppComponent } from './app.component';
77

8-
import { SharedModule } from './modules/shared/shared.module';
9-
import { UserInterfaceModule } from './modules/user-interface/user-interface.module';
8+
import { CoreModule } from './core/core.module';
9+
import { UIModule } from './ui/ui.module';
1010

1111
import { AuthenticationService } from './services/authentication.service';
1212
import { LoadingService } from './services/loading.service';
1313

1414
export const appRoutes: Routes = [
1515
{
1616
path: '',
17-
loadChildren: './modules/index/index.module#IndexModule'
17+
loadChildren: './routes/index/index.module#IndexModule'
1818
},
1919
{
2020
path: 'login',
21-
loadChildren: './modules/login/login.module#LoginModule'
21+
loadChildren: './routes/login/login.module#LoginModule'
2222
},
2323
{
2424
path: 'users',
25-
loadChildren: './modules/users/users.module#UsersModule'
25+
loadChildren: './routes/users/users.module#UsersModule'
2626
},
2727
{
2828
path: 'not-found',
29-
loadChildren: './modules/not-found/not-found.module#NotFoundModule'
29+
loadChildren: './routes/not-found/not-found.module#NotFoundModule'
3030
},
3131
{ path: '**', redirectTo: 'not-found' }
3232
];
@@ -38,8 +38,8 @@ export const appRoutes: Routes = [
3838
imports: [
3939
BrowserModule,
4040
HttpClientModule,
41-
UserInterfaceModule,
42-
SharedModule.forRoot(),
41+
UIModule,
42+
CoreModule.forRoot(),
4343
RouterModule.forRoot(appRoutes)
4444
],
4545
providers: [

src/app/modules/shared/authentication-guard.component.ts renamed to src/app/core/authentication-guard.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Injectable } from '@angular/core';
22
import { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
3-
import { AuthenticationService } from '../../services/authentication.service';
3+
import { AuthenticationService } from '../services/authentication.service';
44

55
@Injectable()
66
export class AuthenticationGuardComponent implements CanActivate {

src/app/modules/shared/shared.module.ts renamed to src/app/core/core.module.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ import { HttpBearerInterceptorComponent } from './http-bearer-interceptor.compon
77
import { HttpLoaderInterceptorComponent } from './http-loader-interceptor.component';
88

99
@NgModule({})
10-
export class SharedModule {
11-
constructor(@Optional() @SkipSelf() parentModule: SharedModule) {
10+
export class CoreModule {
11+
constructor(@Optional() @SkipSelf() parentModule: CoreModule) {
1212
if (parentModule) {
13-
throw new Error('Shared module is already loaded. Import it only in app.module.ts!');
13+
throw new Error('Core module is already loaded. Import it only in app.module.ts!');
1414
}
1515
}
1616

1717
static forRoot(): ModuleWithProviders {
1818
return {
19-
ngModule: SharedModule,
19+
ngModule: CoreModule,
2020
// CUIDADO COM O QUE O SENHOR COLOCA NESSE ARRAY DE PROVIDERS.
2121
// O SISTEMA VAI CARREGAR ISSO TUDO. EM TODOS OS MODULOS.
2222
providers: [

src/app/modules/shared/http-backend-interceptor.component.ts renamed to src/app/core/http-backend-interceptor.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { Injectable } from '@angular/core';
22
import { HttpRequest, HttpResponse, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
33
import { Observable, of, throwError } from 'rxjs';
44
import { delay, mergeMap, materialize, dematerialize } from 'rxjs/operators';
5-
import { Jwt } from '../../domain/Jwt';
6-
import { User } from '../../domain/User';
5+
import { Jwt } from '../domain/Jwt';
6+
import { User } from '../domain/User';
77

88
@Injectable()
99
export class HttpBackendInterceptorComponent implements HttpInterceptor {

src/app/modules/shared/http-loader-interceptor.component.ts renamed to src/app/core/http-loader-interceptor.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';
22
import { HttpRequest, HttpHandler, HttpInterceptor, HttpResponse } from '@angular/common/http';
33
import { tap, catchError } from 'rxjs/operators';
44

5-
import { LoadingService } from '../../services/loading.service';
5+
import { LoadingService } from '../services/loading.service';
66

77
@Injectable()
88
export class HttpLoaderInterceptorComponent implements HttpInterceptor {

0 commit comments

Comments
 (0)