Migración Angular 18
parent
ab8231015b
commit
57da482d8e
File diff suppressed because it is too large
Load Diff
|
@ -10,24 +10,24 @@
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "^17.0.0",
|
"@angular/animations": "^18.0.0",
|
||||||
"@angular/cdk": "~17.3.9",
|
"@angular/cdk": "~17.3.9",
|
||||||
"@angular/common": "^17.0.0",
|
"@angular/common": "^18.0.0",
|
||||||
"@angular/compiler": "^17.0.0",
|
"@angular/compiler": "^18.0.0",
|
||||||
"@angular/core": "^17.0.0",
|
"@angular/core": "^18.0.0",
|
||||||
"@angular/forms": "^17.0.0",
|
"@angular/forms": "^18.0.0",
|
||||||
"@angular/material": "~17.3.9",
|
"@angular/material": "~17.3.9",
|
||||||
"@angular/platform-browser": "^17.0.0",
|
"@angular/platform-browser": "^18.0.0",
|
||||||
"@angular/platform-browser-dynamic": "^17.0.0",
|
"@angular/platform-browser-dynamic": "^18.0.0",
|
||||||
"@angular/router": "^17.0.0",
|
"@angular/router": "^18.0.0",
|
||||||
"rxjs": "~7.8.0",
|
"rxjs": "~7.8.0",
|
||||||
"tslib": "^2.3.0",
|
"tslib": "^2.3.0",
|
||||||
"zone.js": "~0.14.2"
|
"zone.js": "~0.14.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "^17.0.7",
|
"@angular-devkit/build-angular": "^18.0.1",
|
||||||
"@angular/cli": "^17.0.7",
|
"@angular/cli": "^18.0.1",
|
||||||
"@angular/compiler-cli": "^17.0.0",
|
"@angular/compiler-cli": "^18.0.0",
|
||||||
"@types/jasmine": "~5.1.0",
|
"@types/jasmine": "~5.1.0",
|
||||||
"jasmine-core": "~5.1.0",
|
"jasmine-core": "~5.1.0",
|
||||||
"karma": "~6.4.0",
|
"karma": "~6.4.0",
|
||||||
|
@ -35,6 +35,6 @@
|
||||||
"karma-coverage": "~2.2.0",
|
"karma-coverage": "~2.2.0",
|
||||||
"karma-jasmine": "~5.1.0",
|
"karma-jasmine": "~5.1.0",
|
||||||
"karma-jasmine-html-reporter": "~2.1.0",
|
"karma-jasmine-html-reporter": "~2.1.0",
|
||||||
"typescript": "~5.2.2"
|
"typescript": "~5.4.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -8,7 +8,7 @@ import { HeaderComponent } from './components/layout/header/header.component';
|
||||||
import { SidebarComponent } from './components/layout/sidebar/sidebar.component';
|
import { SidebarComponent } from './components/layout/sidebar/sidebar.component';
|
||||||
import { LoginComponent } from './components/login/login.component';
|
import { LoginComponent } from './components/login/login.component';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
|
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
import { CustomInterceptor } from './services/custom.interceptor';
|
import { CustomInterceptor } from './services/custom.interceptor';
|
||||||
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
|
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
|
||||||
import {MatToolbarModule} from '@angular/material/toolbar';
|
import {MatToolbarModule} from '@angular/material/toolbar';
|
||||||
|
@ -18,38 +18,31 @@ import { MatSidenavModule } from '@angular/material/sidenav';
|
||||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { UsersComponent } from './components/pages/users/users.component';
|
import { UsersComponent } from './components/pages/users/users.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({ declarations: [
|
||||||
imports: [
|
AppComponent,
|
||||||
BrowserModule,
|
AuthLayoutComponent,
|
||||||
AppRoutingModule,
|
MainLayoutComponent,
|
||||||
FormsModule,
|
HeaderComponent,
|
||||||
HttpClientModule,
|
SidebarComponent,
|
||||||
MatToolbarModule,
|
LoginComponent,
|
||||||
MatIconModule,
|
UsersComponent,
|
||||||
MatButtonModule,
|
MainLayoutComponent,
|
||||||
MatSidenavModule,
|
UsersComponent,
|
||||||
BrowserAnimationsModule
|
],
|
||||||
],
|
bootstrap: [AppComponent], imports: [BrowserModule,
|
||||||
declarations: [
|
AppRoutingModule,
|
||||||
AppComponent,
|
FormsModule,
|
||||||
AuthLayoutComponent,
|
MatToolbarModule,
|
||||||
MainLayoutComponent,
|
MatIconModule,
|
||||||
HeaderComponent,
|
MatButtonModule,
|
||||||
SidebarComponent,
|
MatSidenavModule,
|
||||||
LoginComponent,
|
BrowserAnimationsModule], providers: [
|
||||||
UsersComponent,
|
{
|
||||||
MainLayoutComponent,
|
provide: HTTP_INTERCEPTORS,
|
||||||
UsersComponent,
|
useClass: CustomInterceptor,
|
||||||
|
multi: true
|
||||||
],
|
},
|
||||||
providers: [
|
provideAnimationsAsync(),
|
||||||
{
|
provideHttpClient(withInterceptorsFromDi())
|
||||||
provide: HTTP_INTERCEPTORS,
|
] })
|
||||||
useClass: CustomInterceptor,
|
|
||||||
multi:true
|
|
||||||
},
|
|
||||||
provideAnimationsAsync()
|
|
||||||
],
|
|
||||||
bootstrap: [AppComponent]
|
|
||||||
})
|
|
||||||
export class AppModule { }
|
export class AppModule { }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import {} from '@angular/common/http';
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { RouterOutlet } from '@angular/router';
|
import { RouterOutlet } from '@angular/router';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { LoginComponent } from './login.component';
|
import { LoginComponent } from './login.component';
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
|
|
||||||
describe('LoginComponent', () => {
|
describe('LoginComponent', () => {
|
||||||
|
@ -10,9 +10,10 @@ describe('LoginComponent', () => {
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [HttpClientModule, FormsModule],
|
declarations: [LoginComponent],
|
||||||
declarations: [LoginComponent]
|
imports: [FormsModule],
|
||||||
})
|
providers: [provideHttpClient(withInterceptorsFromDi())]
|
||||||
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
|
|
||||||
fixture = TestBed.createComponent(LoginComponent);
|
fixture = TestBed.createComponent(LoginComponent);
|
||||||
|
|
Loading…
Reference in New Issue