Skip to content

Commit 29c865e

Browse files
committed
added
1 parent 9fcb899 commit 29c865e

35 files changed

+6928
-0
lines changed

src/app/app-menu/app-menu.component.css

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<div style="display: flex">
2+
<div><a [routerLink]="['mod1']">Module1</a></div>
3+
<div><a [routerLink]="['mod2']">Module2</a></div>
4+
</div>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { AppMenuComponent } from './app-menu.component';
4+
5+
describe('AppMenuComponent', () => {
6+
let component: AppMenuComponent;
7+
let fixture: ComponentFixture<AppMenuComponent>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ AppMenuComponent ]
12+
})
13+
.compileComponents();
14+
}));
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(AppMenuComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-app-menu',
5+
templateUrl: './app-menu.component.html',
6+
styleUrls: ['./app-menu.component.css']
7+
})
8+
export class AppMenuComponent implements OnInit {
9+
10+
constructor() { }
11+
12+
ngOnInit() {
13+
}
14+
15+
}

src/app/modules/module1/mod1-menu/mod1-menu.component.css

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<div style="display: flex;">
2+
<a [routerLink]="[{outlets:{'main':['screen1']}}]">screen1</a>|
3+
<a [routerLink]="[{outlets:{main:'screen2'}}]">screen2</a>
4+
</div>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { Mod1MenuComponent } from './mod1-menu.component';
4+
5+
describe('Mod1MenuComponent', () => {
6+
let component: Mod1MenuComponent;
7+
let fixture: ComponentFixture<Mod1MenuComponent>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ Mod1MenuComponent ]
12+
})
13+
.compileComponents();
14+
}));
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(Mod1MenuComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-mod1-menu',
5+
templateUrl: './mod1-menu.component.html',
6+
styleUrls: ['./mod1-menu.component.css']
7+
})
8+
export class Mod1MenuComponent implements OnInit {
9+
10+
constructor() { }
11+
12+
ngOnInit() {
13+
}
14+
15+
}

src/app/modules/module1/module1-main/module1-main.component.css

Whitespace-only changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<div>
2+
<app-mod1-menu></app-mod1-menu>
3+
</div>
4+
5+
<div>^router-outlet------------------------------------------------\/main-outlet</div>
6+
<div>
7+
<router-outlet name="main"></router-outlet>
8+
</div>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { Module1MainComponent } from './module1-main.component';
4+
5+
describe('Module1MainComponent', () => {
6+
let component: Module1MainComponent;
7+
let fixture: ComponentFixture<Module1MainComponent>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ Module1MainComponent ]
12+
})
13+
.compileComponents();
14+
}));
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(Module1MainComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-module1-main',
5+
templateUrl: './module1-main.component.html',
6+
styleUrls: ['./module1-main.component.css']
7+
})
8+
export class Module1MainComponent implements OnInit {
9+
10+
constructor() { }
11+
12+
ngOnInit() {
13+
}
14+
15+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { NgModule } from '@angular/core';
2+
import { Routes, RouterModule } from '@angular/router';
3+
import { Module1MainComponent } from './module1-main/module1-main.component';
4+
import { Screen1Component } from './screen1/screen1.component';
5+
import { Screen2Component } from './screen2/screen2.component';
6+
import {Sec1Component} from './sec1/sec1.component';
7+
8+
const routes: Routes = [
9+
{path: '', redirectTo: 'lm'},
10+
{
11+
path: 'lm', component: Module1MainComponent, children: [
12+
{path: 'screen1', component: Screen1Component, outlet: 'main', children: [
13+
{path: 'sec1', component: Sec1Component, outlet: 'sec1_out'}
14+
]},
15+
{path: 'screen2', component: Screen2Component, outlet: 'main'}
16+
]}
17+
];
18+
19+
@NgModule({
20+
imports: [RouterModule.forChild(routes)],
21+
exports: [RouterModule]
22+
})
23+
export class Module1RoutingModule { }
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Module1Module } from './module1.module';
2+
3+
describe('Module1Module', () => {
4+
let module1Module: Module1Module;
5+
6+
beforeEach(() => {
7+
module1Module = new Module1Module();
8+
});
9+
10+
it('should create an instance', () => {
11+
expect(module1Module).toBeTruthy();
12+
});
13+
});
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { NgModule } from '@angular/core';
2+
import { CommonModule } from '@angular/common';
3+
4+
import { Module1RoutingModule } from './module1-routing.module';
5+
import { Module1MainComponent } from './module1-main/module1-main.component';
6+
import { Mod1MenuComponent } from './mod1-menu/mod1-menu.component';
7+
import { Screen1Component } from './screen1/screen1.component';
8+
import { Screen2Component } from './screen2/screen2.component';
9+
import { Sec1Component } from './sec1/sec1.component';
10+
11+
@NgModule({
12+
imports: [
13+
CommonModule,
14+
Module1RoutingModule
15+
],
16+
declarations: [Module1MainComponent, Mod1MenuComponent, Screen1Component, Screen2Component, Sec1Component]
17+
})
18+
export class Module1Module { }

src/app/modules/module1/screen1/screen1.component.css

Whitespace-only changes.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<div><a [routerLink]="[{outlets: {sec1_out: ['sec1']}}]">Section1</a>
2+
<router-outlet name="sec1_out"></router-outlet>
3+
</div>
4+
<div>-------------</div>
5+
<div>Section2
6+
<router-outlet name="sec2"></router-outlet>
7+
</div>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { Screen1Component } from './screen1.component';
4+
5+
describe('Screen1Component', () => {
6+
let component: Screen1Component;
7+
let fixture: ComponentFixture<Screen1Component>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ Screen1Component ]
12+
})
13+
.compileComponents();
14+
}));
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(Screen1Component);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-screen1',
5+
templateUrl: './screen1.component.html',
6+
styleUrls: ['./screen1.component.css']
7+
})
8+
export class Screen1Component implements OnInit {
9+
10+
constructor() { }
11+
12+
ngOnInit() {
13+
}
14+
15+
}

src/app/modules/module1/screen2/screen2.component.css

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<p>
2+
screen2 works!
3+
</p>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { Screen2Component } from './screen2.component';
4+
5+
describe('Screen2Component', () => {
6+
let component: Screen2Component;
7+
let fixture: ComponentFixture<Screen2Component>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ Screen2Component ]
12+
})
13+
.compileComponents();
14+
}));
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(Screen2Component);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-screen2',
5+
templateUrl: './screen2.component.html',
6+
styleUrls: ['./screen2.component.css']
7+
})
8+
export class Screen2Component implements OnInit {
9+
10+
constructor() { }
11+
12+
ngOnInit() {
13+
}
14+
15+
}

src/app/modules/module1/sec1/sec1.component.css

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<p>
2+
sec1 works!
3+
</p>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { Sec1Component } from './sec1.component';
4+
5+
describe('Sec1Component', () => {
6+
let component: Sec1Component;
7+
let fixture: ComponentFixture<Sec1Component>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ Sec1Component ]
12+
})
13+
.compileComponents();
14+
}));
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(Sec1Component);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-sec1',
5+
templateUrl: './sec1.component.html',
6+
styleUrls: ['./sec1.component.css']
7+
})
8+
export class Sec1Component implements OnInit {
9+
10+
constructor() { }
11+
12+
ngOnInit() {
13+
}
14+
15+
}

src/app/modules/module2/module2-main/module2-main.component.css

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<p>
2+
module2-main works!
3+
</p>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { Module2MainComponent } from './module2-main.component';
4+
5+
describe('Module2MainComponent', () => {
6+
let component: Module2MainComponent;
7+
let fixture: ComponentFixture<Module2MainComponent>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ Module2MainComponent ]
12+
})
13+
.compileComponents();
14+
}));
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(Module2MainComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-module2-main',
5+
templateUrl: './module2-main.component.html',
6+
styleUrls: ['./module2-main.component.css']
7+
})
8+
export class Module2MainComponent implements OnInit {
9+
10+
constructor() { }
11+
12+
ngOnInit() {
13+
}
14+
15+
}

0 commit comments

Comments
 (0)