File

src/modules/firetask/pages/ft-chat/ft-chat.ts

Description

Generated class for the ChatPage page.

See http://ionicframework.com/docs/components/#navigation for more info on Ionic pages and navigation.

Metadata

selector page-ft-chat
templateUrl ft-chat.html

Index

Properties
Methods

Constructor

constructor(navCtrl: NavController, navParams: NavParams, toast: ToastController, session: FtSessionProvider, chat: FtChatProvider, utils: FtUtilsProvider, events: Events, nav: NavController, alert: AlertController, storage: Storage, zone: NgZone, loader: LoadingController, friends: FtFriendsProvider)
Parameters :
Name Type Optional Description
navCtrl NavController
navParams NavParams
toast ToastController
session FtSessionProvider
chat FtChatProvider
utils FtUtilsProvider
events Events
nav NavController
alert AlertController
storage Storage
zone NgZone
loader LoadingController
friends FtFriendsProvider

Methods

ionViewDidLoad
ionViewDidLoad()
Returns : void
ngOnDestroy
ngOnDestroy()

Turn off subscribers

Returns : void
Private process
process(snapshot: )

Process the messages

Parameters :
Name Type Optional Description
snapshot
Returns : void
Public send
send()

Send a message

Returns : void

Properties

Public alert
alert: AlertController
Type : AlertController
Public chat
chat: FtChatProvider
Type : FtChatProvider
content
content: Content
Type : Content
Decorators : ViewChild
Public events
events: Events
Type : Events
Public friends
friends: FtFriendsProvider
Type : FtFriendsProvider
Public loader
loader: LoadingController
Type : LoadingController
message
message: string
Type : string
messages
messages: any
Type : any
Public nav
nav: NavController
Type : NavController
Public navCtrl
navCtrl: NavController
Type : NavController
Public navParams
navParams: NavParams
Type : NavParams
Public session
session: FtSessionProvider
Type : FtSessionProvider
Public storage
storage: Storage
Type : Storage
subscribers
subscribers: any[]
Type : any[]
to
to: any
Type : any
Public toast
toast: ToastController
Type : ToastController
Public utils
utils: FtUtilsProvider
Type : FtUtilsProvider
Public zone
zone: NgZone
Type : NgZone
<ion-header>
    <ion-navbar color="secondary">
      <button ion-button icon-only menuToggle>
        <ion-icon name="menu"></ion-icon>
      </button>
      <ion-title>{{to.displayName||to.email}}</ion-title>
    </ion-navbar>
  </ion-header>
  
  <ion-content>
    <br /><br /><br />
    <ion-list no-lines id="item-list">
      <ion-item *ngFor="let chat of messages">
        <ion-avatar item-left *ngIf="chat.from != session.logged.uid">
          <img [src]="chat.photoURL||'assets/images/user-blank.svg'">
        </ion-avatar>
        <ion-badge color="primary" *ngIf="chat.from != session.logged.uid">{{chat.text}}</ion-badge>
        <ion-badge color="secondary" *ngIf="chat.from == session.logged.uid" item-right>{{chat.text}}</ion-badge>
      </ion-item>
    </ion-list>
  </ion-content>
  
  <ion-footer>
    <ion-toolbar id="toolbar-footer">
      <ion-input type="text" placeholder="Type here.." [(ngModel)]="message"></ion-input>
    </ion-toolbar>
    <ion-fab right bottom>
      <button ion-fab color="secondary" (tap)="send()"><ion-icon name="ios-send" is-active="false"></ion-icon></button>
    </ion-fab>
  </ion-footer>
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""