| @@ -37,6 +37,10 @@ const routes: Routes = [ | |||||
| { | { | ||||
| path: 'match-details', | path: 'match-details', | ||||
| loadChildren: () => import('./match-details/match-details.module').then( m => m.MatchDetailsPageModule) | loadChildren: () => import('./match-details/match-details.module').then( m => m.MatchDetailsPageModule) | ||||
| }, | |||||
| { | |||||
| path: 'chat', | |||||
| loadChildren: () => import('./chat/chat.module').then( m => m.ChatPageModule) | |||||
| } | } | ||||
| ]; | ]; | ||||
| @NgModule({ | @NgModule({ | ||||
| @@ -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 {} | |||||
| @@ -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 {} | |||||
| @@ -0,0 +1,9 @@ | |||||
| <ion-header> | |||||
| <ion-toolbar> | |||||
| <ion-title>chat</ion-title> | |||||
| </ion-toolbar> | |||||
| </ion-header> | |||||
| <ion-content> | |||||
| </ion-content> | |||||
| @@ -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<ChatPage>; | |||||
| 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(); | |||||
| }); | |||||
| }); | |||||
| @@ -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() { | |||||
| } | |||||
| } | |||||
| @@ -51,4 +51,10 @@ | |||||
| </div> | </div> | ||||
| <ion-fab vertical="bottom" horizontal="end" slot="fixed"> | |||||
| <ion-fab-button class="chat-button" [routerLink]="['/chat']"> | |||||
| <ion-icon name="chatbubble-ellipses-outline"></ion-icon> | |||||
| </ion-fab-button> | |||||
| </ion-fab> | |||||
| </ion-content> | </ion-content> | ||||
| @@ -157,4 +157,12 @@ ion-content { | |||||
| color: white; | color: white; | ||||
| } | } | ||||
| } | } | ||||
| } | |||||
| ion-fab { | |||||
| transform: translateX(-30%); | |||||
| } | |||||
| .chat-button { | |||||
| --background: #d73e53; | |||||
| } | } | ||||
| @@ -1,4 +1,6 @@ | |||||
| import { Component, OnInit } from '@angular/core'; | import { Component, OnInit } from '@angular/core'; | ||||
| import { ModalController } from '@ionic/angular'; | |||||
| import { ChatPage } from '../chat/chat.page'; | |||||
| @Component({ | @Component({ | ||||
| selector: 'app-live', | selector: 'app-live', | ||||
| @@ -6,9 +8,20 @@ import { Component, OnInit } from '@angular/core'; | |||||
| styleUrls: ['./live.page.scss'], | styleUrls: ['./live.page.scss'], | ||||
| }) | }) | ||||
| export class LivePage implements OnInit { | export class LivePage implements OnInit { | ||||
| constructor() { } | |||||
| constructor( | |||||
| public modalController: ModalController | |||||
| ) { } | |||||
| ngOnInit() { | ngOnInit() { | ||||
| } | } | ||||
| async presentChatModal() { | |||||
| const modal = await this.modalController.create({ | |||||
| component: ChatPage, | |||||
| cssClass: 'my-custom-class' | |||||
| }); | |||||
| return await modal.present(); | |||||
| } | |||||
| } | } | ||||