diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 42d17b4..ca2a1d2 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -37,6 +37,10 @@ const routes: Routes = [ { path: 'match-details', loadChildren: () => import('./match-details/match-details.module').then( m => m.MatchDetailsPageModule) + }, + { + path: 'chat', + loadChildren: () => import('./chat/chat.module').then( m => m.ChatPageModule) } ]; @NgModule({ diff --git a/src/app/chat/chat-routing.module.ts b/src/app/chat/chat-routing.module.ts new file mode 100644 index 0000000..2f67102 --- /dev/null +++ b/src/app/chat/chat-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { ChatPage } from './chat.page'; + +const routes: Routes = [ + { + path: '', + component: ChatPage + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class ChatPageRoutingModule {} diff --git a/src/app/chat/chat.module.ts b/src/app/chat/chat.module.ts new file mode 100644 index 0000000..b15c82b --- /dev/null +++ b/src/app/chat/chat.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + +import { IonicModule } from '@ionic/angular'; + +import { ChatPageRoutingModule } from './chat-routing.module'; + +import { ChatPage } from './chat.page'; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + ChatPageRoutingModule + ], + declarations: [ChatPage] +}) +export class ChatPageModule {} diff --git a/src/app/chat/chat.page.html b/src/app/chat/chat.page.html new file mode 100644 index 0000000..0bb1fb3 --- /dev/null +++ b/src/app/chat/chat.page.html @@ -0,0 +1,9 @@ + + + chat + + + + + + diff --git a/src/app/chat/chat.page.scss b/src/app/chat/chat.page.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/chat/chat.page.spec.ts b/src/app/chat/chat.page.spec.ts new file mode 100644 index 0000000..d499f6b --- /dev/null +++ b/src/app/chat/chat.page.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { ChatPage } from './chat.page'; + +describe('ChatPage', () => { + let component: ChatPage; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ChatPage ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(ChatPage); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/chat/chat.page.ts b/src/app/chat/chat.page.ts new file mode 100644 index 0000000..8e05778 --- /dev/null +++ b/src/app/chat/chat.page.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-chat', + templateUrl: './chat.page.html', + styleUrls: ['./chat.page.scss'], +}) +export class ChatPage implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/live/live.page.html b/src/app/live/live.page.html index 649db7d..4778d94 100644 --- a/src/app/live/live.page.html +++ b/src/app/live/live.page.html @@ -51,4 +51,10 @@ + + + + + + diff --git a/src/app/live/live.page.scss b/src/app/live/live.page.scss index 93c027d..7e3a1de 100644 --- a/src/app/live/live.page.scss +++ b/src/app/live/live.page.scss @@ -157,4 +157,12 @@ ion-content { color: white; } } +} + +ion-fab { + transform: translateX(-30%); +} + +.chat-button { + --background: #d73e53; } \ No newline at end of file diff --git a/src/app/live/live.page.ts b/src/app/live/live.page.ts index fe4b0bb..eed0e64 100644 --- a/src/app/live/live.page.ts +++ b/src/app/live/live.page.ts @@ -1,4 +1,6 @@ import { Component, OnInit } from '@angular/core'; +import { ModalController } from '@ionic/angular'; +import { ChatPage } from '../chat/chat.page'; @Component({ selector: 'app-live', @@ -6,9 +8,20 @@ import { Component, OnInit } from '@angular/core'; styleUrls: ['./live.page.scss'], }) export class LivePage implements OnInit { - constructor() { } + + constructor( + public modalController: ModalController + ) { } ngOnInit() { } + async presentChatModal() { + const modal = await this.modalController.create({ + component: ChatPage, + cssClass: 'my-custom-class' + }); + return await modal.present(); + } + }