multi-app

master
Boris Voropaev 2023-10-30 16:10:12 +03:00
parent dc8e3465cf
commit e4acefc06e
20 changed files with 27 additions and 73 deletions

View File

@ -30,7 +30,7 @@
"projects/app-a/src/assets" "projects/app-a/src/assets"
], ],
"styles": [ "styles": [
"projects/app-a/src/styles.scss" "projects/app-a/src/styles-b.scss"
], ],
"scripts": [] "scripts": []
}, },
@ -127,7 +127,7 @@
"projects/app-b/src/assets" "projects/app-b/src/assets"
], ],
"styles": [ "styles": [
"projects/app-b/src/styles.scss" "projects/app-b/src/styles-c.scss"
], ],
"scripts": [] "scripts": []
}, },

View File

@ -1,6 +1,6 @@
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module'; import { AppModule } from '../../app/app.module';
platformBrowserDynamic().bootstrapModule(AppModule) platformBrowserDynamic().bootstrapModule(AppModule)

View File

@ -0,0 +1,7 @@
/* You can add global styles to this file, and also import other style files */
body{
background-color: aquamarine;
h1{
color: midnightblue;
}
}

View File

@ -1 +0,0 @@
/* You can add global styles to this file, and also import other style files */

View File

@ -1,10 +0,0 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
const routes: Routes = [];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }

View File

@ -1 +0,0 @@
<h1>App-B</h1>

View File

@ -1,29 +0,0 @@
import { TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(() => TestBed.configureTestingModule({
imports: [RouterTestingModule],
declarations: [AppComponent]
}));
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});
it(`should have as title 'app-b'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('app-b');
});
it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('.content span')?.textContent).toContain('app-b app is running!');
});
});

View File

@ -1,10 +0,0 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
title = 'app-b';
}

View File

@ -1,18 +0,0 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AppRoutingModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }

View File

@ -0,0 +1,8 @@
/* You can add global styles to this file, and also import other style files */
body{
background-color:cadetblue;
h1{
color:darkolivegreen;
font-family:'Times New Roman', Times, serif;
}
}

View File

@ -1,6 +1,6 @@
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module'; import { AppModule } from '../../app/app.module';
platformBrowserDynamic().bootstrapModule(AppModule) platformBrowserDynamic().bootstrapModule(AppModule)

View File

@ -0,0 +1,8 @@
/* You can add global styles to this file, and also import other style files */
body{
background-color:cadetblue;
h1{
color:darkolivegreen;
font-family:'Times New Roman', Times, serif;
}
}