Parcourir la source

Chat page init

master
kj1352 il y a 4 ans
Parent
révision
6403d526c0
10 fichiers modifiés avec 117 ajouts et 1 suppressions
  1. +4
    -0
      src/app/app-routing.module.ts
  2. +17
    -0
      src/app/chat/chat-routing.module.ts
  3. +20
    -0
      src/app/chat/chat.module.ts
  4. +9
    -0
      src/app/chat/chat.page.html
  5. +0
    -0
      src/app/chat/chat.page.scss
  6. +24
    -0
      src/app/chat/chat.page.spec.ts
  7. +15
    -0
      src/app/chat/chat.page.ts
  8. +6
    -0
      src/app/live/live.page.html
  9. +8
    -0
      src/app/live/live.page.scss
  10. +14
    -1
      src/app/live/live.page.ts

+ 4
- 0
src/app/app-routing.module.ts Voir le fichier

@@ -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({


+ 17
- 0
src/app/chat/chat-routing.module.ts Voir le fichier

@@ -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 {}

+ 20
- 0
src/app/chat/chat.module.ts Voir le fichier

@@ -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 {}

+ 9
- 0
src/app/chat/chat.page.html Voir le fichier

@@ -0,0 +1,9 @@
<ion-header>
<ion-toolbar>
<ion-title>chat</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>

</ion-content>

+ 0
- 0
src/app/chat/chat.page.scss Voir le fichier


+ 24
- 0
src/app/chat/chat.page.spec.ts Voir le fichier

@@ -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();
});
});

+ 15
- 0
src/app/chat/chat.page.ts Voir le fichier

@@ -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() {
}

}

+ 6
- 0
src/app/live/live.page.html Voir le fichier

@@ -51,4 +51,10 @@

</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>

+ 8
- 0
src/app/live/live.page.scss Voir le fichier

@@ -157,4 +157,12 @@ ion-content {
color: white;
}
}
}

ion-fab {
transform: translateX(-30%);
}

.chat-button {
--background: #d73e53;
}

+ 14
- 1
src/app/live/live.page.ts Voir le fichier

@@ -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();
}

}

Chargement…
Annuler
Enregistrer