-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: base layout of new version
- Loading branch information
1 parent
faf480a
commit 3aa931f
Showing
74 changed files
with
1,478 additions
and
938 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<app-nx-welcome></app-nx-welcome> <router-outlet></router-outlet> | ||
<router-outlet></router-outlet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,22 @@ | ||
import { TestBed } from '@angular/core/testing'; | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
import { AppComponent } from './app.component'; | ||
import { NxWelcomeComponent } from './nx-welcome.component'; | ||
import { RouterTestingModule } from '@angular/router/testing'; | ||
import { RouterModule } from '@angular/router'; | ||
|
||
describe('AppComponent', () => { | ||
let fixture: ComponentFixture<AppComponent>; | ||
let app: AppComponent; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [AppComponent, NxWelcomeComponent, RouterTestingModule], | ||
imports: [AppComponent, RouterModule], | ||
}).compileComponents(); | ||
}); | ||
|
||
it('should render title', () => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
fixture = TestBed.createComponent(AppComponent); | ||
app = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
const compiled = fixture.nativeElement as HTMLElement; | ||
expect(compiled.querySelector('h1')?.textContent).toContain( | ||
'Welcome portfolio' | ||
); | ||
}); | ||
|
||
it(`should have as title 'portfolio'`, () => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
const app = fixture.componentInstance; | ||
expect(app.title).toEqual('portfolio'); | ||
it('should create', () => { | ||
expect(app).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
import { Component } from '@angular/core'; | ||
import { RouterModule } from '@angular/router'; | ||
import { NxWelcomeComponent } from './nx-welcome.component'; | ||
|
||
@Component({ | ||
standalone: true, | ||
imports: [NxWelcomeComponent, RouterModule], | ||
imports: [RouterModule], | ||
selector: 'app-root', | ||
templateUrl: './app.component.html', | ||
styleUrl: './app.component.scss', | ||
}) | ||
export class AppComponent { | ||
title = 'portfolio'; | ||
} | ||
export class AppComponent {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
import { Route } from '@angular/router'; | ||
import { BaseLayoutComponent } from '@valerymelou/shared/layout'; | ||
import { themeResolver } from '@valerymelou/core/theming'; | ||
|
||
export const appRoutes: Route[] = []; | ||
export const appRoutes: Route[] = [ | ||
{ | ||
path: '', | ||
component: BaseLayoutComponent, | ||
resolve: { | ||
theme: themeResolver, | ||
}, | ||
children: [ | ||
{ | ||
path: '', | ||
loadComponent: () => | ||
import('@valerymelou/pages/about').then((c) => c.AboutComponent), | ||
}, | ||
], | ||
}, | ||
]; |
Oops, something went wrong.