Skip to content

Commit f220845

Browse files
committed
feat(demo): add basic example skeleton
1 parent 76c68a8 commit f220845

26 files changed

+201
-44
lines changed

projects/elements-demo/src/app/core/layout/navigation/navigation.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ const NAVIGATION = [
1414
url: 'docs/getting-started'
1515
},
1616
{
17-
label: 'Mechanism',
18-
url: 'docs/mechanism'
17+
label: 'How it works',
18+
url: 'docs/how-it-works'
1919
}
2020
]
2121
},
@@ -25,11 +25,11 @@ const NAVIGATION = [
2525
children: [
2626
{
2727
label: 'Basic',
28-
url: 'basic'
28+
url: 'examples/basic'
2929
},
3030
{
3131
label: 'Lazy Loading',
32-
url: 'lazy'
32+
url: 'examples/lazy'
3333
}
3434
]
3535
}

projects/elements-demo/src/app/features/docs/docs-routing.module.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ const routes: Routes = [
2121
)
2222
},
2323
{
24-
path: 'mechanism',
24+
path: 'how-it-works',
2525
loadChildren: () =>
26-
import('./mechanism/mechanism.module').then(m => m.MechanismModule)
26+
import('./how-it-works/how-it-works.module').then(
27+
m => m.HowItWorksModule
28+
)
2729
}
2830
]
2931
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
:host {
2+
display: flex;
3+
flex-direction: column;
4+
padding: 40px;
5+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { NgModule } from '@angular/core';
2+
import { Routes, RouterModule } from '@angular/router';
3+
4+
import { HowItWorksComponent } from './how-it-works.component';
5+
6+
const routes: Routes = [{ path: '', component: HowItWorksComponent }];
7+
8+
@NgModule({
9+
imports: [RouterModule.forChild(routes)],
10+
exports: [RouterModule]
11+
})
12+
export class HowItWorksRoutingModule {}
File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<p>how-it-works works!</p>

projects/elements-demo/src/app/features/docs/mechanism/mechanism.component.spec.ts renamed to projects/elements-demo/src/app/features/docs/how-it-works/how-it-works.component.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
22

3-
import { MechanismComponent } from './mechanism.component';
3+
import { HowItWorksComponent } from './how-it-works.component';
44

5-
describe('MechanismComponent', () => {
6-
let component: MechanismComponent;
7-
let fixture: ComponentFixture<MechanismComponent>;
5+
describe('HowItWorksComponent', () => {
6+
let component: HowItWorksComponent;
7+
let fixture: ComponentFixture<HowItWorksComponent>;
88

99
beforeEach(async(() => {
1010
TestBed.configureTestingModule({
11-
declarations: [MechanismComponent]
11+
declarations: [HowItWorksComponent]
1212
}).compileComponents();
1313
}));
1414

1515
beforeEach(() => {
16-
fixture = TestBed.createComponent(MechanismComponent);
16+
fixture = TestBed.createComponent(HowItWorksComponent);
1717
component = fixture.componentInstance;
1818
fixture.detectChanges();
1919
});
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'demo-how-it-works',
5+
templateUrl: './how-it-works.component.html',
6+
styleUrls: ['./how-it-works.component.css']
7+
})
8+
export class HowItWorksComponent implements OnInit {
9+
constructor() {}
10+
11+
ngOnInit() {}
12+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { NgModule } from '@angular/core';
2+
import { CommonModule } from '@angular/common';
3+
4+
import { HowItWorksRoutingModule } from './how-it-works-routing.module';
5+
import { HowItWorksComponent } from './how-it-works.component';
6+
7+
@NgModule({
8+
declarations: [HowItWorksComponent],
9+
imports: [CommonModule, HowItWorksRoutingModule]
10+
})
11+
export class HowItWorksModule {}

projects/elements-demo/src/app/features/docs/mechanism/mechanism.component.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)