generated from amosproj/amos202Xss0Y-projname
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from amosproj/feat/xd-47
feat: Add Navigation/Routing(XD-47)
- Loading branch information
Showing
66 changed files
with
15,503 additions
and
19,459 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 |
---|---|---|
|
@@ -12,6 +12,9 @@ | |
"passWithNoTests": true | ||
}, | ||
"dependsOn": ["backend:build"] | ||
}, | ||
"lint": { | ||
"executor": "@nx/eslint:lint" | ||
} | ||
} | ||
} |
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,31 +1,34 @@ | ||
{ | ||
"name": "backend", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"sourceRoot": "apps/backend/src", | ||
"projectType": "application", | ||
"tags": ["tier:backend", "type:app"], | ||
"targets": { | ||
"serve": { | ||
"executor": "@nx/js:node", | ||
"defaultConfiguration": "development", | ||
"options": { | ||
"buildTarget": "backend:build" | ||
}, | ||
"configurations": { | ||
"development": { | ||
"buildTarget": "backend:build:development" | ||
}, | ||
"production": { | ||
"buildTarget": "backend:build:production" | ||
} | ||
} | ||
}, | ||
"test": { | ||
"executor": "@nx/jest:jest", | ||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"], | ||
"options": { | ||
"jestConfig": "apps/backend/jest.config.ts" | ||
} | ||
} | ||
} | ||
"name": "backend", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"sourceRoot": "apps/backend/src", | ||
"projectType": "application", | ||
"tags": ["tier:backend", "type:app"], | ||
"targets": { | ||
"serve": { | ||
"executor": "@nx/js:node", | ||
"defaultConfiguration": "development", | ||
"options": { | ||
"buildTarget": "backend:build" | ||
}, | ||
"configurations": { | ||
"development": { | ||
"buildTarget": "backend:build:development" | ||
}, | ||
"production": { | ||
"buildTarget": "backend:build:production" | ||
} | ||
} | ||
}, | ||
"test": { | ||
"executor": "@nx/jest:jest", | ||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"], | ||
"options": { | ||
"jestConfig": "apps/backend/jest.config.ts" | ||
} | ||
}, | ||
"lint": { | ||
"executor": "@nx/eslint:lint" | ||
} | ||
} | ||
} |
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
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,16 +1 @@ | ||
<ix-application> | ||
<ix-application-header name="My Application"> | ||
<div class="placeholder-logo" slot="logo"></div> | ||
</ix-application-header> | ||
<ix-menu> | ||
<ix-menu-item>Item 1</ix-menu-item> | ||
<ix-menu-item>Item 2</ix-menu-item> | ||
</ix-menu> | ||
<ix-content> | ||
<ix-content-header slot="header" header-title="My Content Page"> </ix-content-header> | ||
<div class="text-4xl">This text ist big because of a tailwind class</div> | ||
<div class="bg-custom-pink">The background is pink because of a custom color</div> | ||
<div class="test-custom-class">This text is centered because of a custom class</div> | ||
<router-outlet></router-outlet> | ||
</ix-content> | ||
</ix-application> | ||
<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,18 +1,22 @@ | ||
import { TestBed } from '@angular/core/testing'; | ||
import { RouterTestingModule } from '@angular/router/testing'; | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { AppComponent } from './app.component'; | ||
|
||
describe('AppComponent', () => { | ||
let component: AppComponent; | ||
let fixture: ComponentFixture<AppComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [AppComponent, RouterTestingModule], | ||
imports: [AppComponent], | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(AppComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it(`should have as title 'frontend'`, () => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
const app = fixture.componentInstance; | ||
expect(app.title).toEqual('frontend'); | ||
it('should create the app', () => { | ||
expect(component).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
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,9 +1,12 @@ | ||
import { ApplicationConfig, importProvidersFrom } from '@angular/core'; | ||
import { provideRouter } from '@angular/router'; | ||
import { provideRouter, withComponentInputBinding } from '@angular/router'; | ||
import { IxModule } from '@siemens/ix-angular'; | ||
|
||
import { appRoutes } from './app.routes'; | ||
import { APP_ROUTES } from './app.routes'; | ||
|
||
export const appConfig: ApplicationConfig = { | ||
providers: [provideRouter(appRoutes), importProvidersFrom(IxModule.forRoot())], | ||
providers: [ | ||
provideRouter(APP_ROUTES, withComponentInputBinding()), | ||
importProvidersFrom(IxModule.forRoot()), | ||
], | ||
}; |
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,43 @@ | ||
import { Route } from '@angular/router'; | ||
|
||
export const appRoutes: Route[] = []; | ||
import { AppRootLayout } from './layouts/root.layout'; | ||
|
||
export const APP_ROUTES: Route[] = [ | ||
{ | ||
path: '', | ||
component: AppRootLayout, | ||
data: { | ||
breadcrumbs: { | ||
label: 'Home', | ||
url: '/', | ||
}, | ||
}, | ||
children: [ | ||
{ | ||
path: 'facilities', | ||
data: { | ||
breadcrumbs: { | ||
label: 'Facilities', | ||
url: 'facilities', | ||
}, | ||
}, | ||
loadChildren: () => | ||
import('facilities-frontend-shell').then((m) => m.FACILITIES_SHELL_ROUTES), | ||
}, | ||
{ | ||
path: 'orders', | ||
loadChildren: () => | ||
import('orders-frontend-shell').then((m) => m.ORDERS_SHELL_ROUTES), | ||
}, | ||
], | ||
}, | ||
{ | ||
path: 'not-found', | ||
loadComponent: () => | ||
import('./pages/not-found/not-found.component').then((m) => m.NotFoundComponent), | ||
}, | ||
{ | ||
path: '**', | ||
redirectTo: 'not-found', | ||
}, | ||
]; |
Oops, something went wrong.