Commit d4a279a3 authored by isurugunarathna's avatar isurugunarathna

adding pet page UI

parent a1eb4673
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { PetPagePage } from './pet-page.page';
const routes: Routes = [
{
path: '',
component: PetPagePage
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class PetPagePageRoutingModule {}
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { IonicModule } from '@ionic/angular';
import { PetPagePageRoutingModule } from './pet-page-routing.module';
import { PetPagePage } from './pet-page.page';
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
PetPagePageRoutingModule
],
declarations: [PetPagePage]
})
export class PetPagePageModule {}
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<ion-back-button></ion-back-button>
</ion-buttons>
</ion-toolbar>
</ion-header>
<ion-content>
<div class="container-fluid" style="background-color: #E9F0FB">
<div class="row ion-justify-content-center" style="height: 100vh">
<div class="col-11">
<div class="row mt-2">
<div class="col rounded-3 border border-dark p-5 ion-text-center">
<img src="assets/dog3.jpg" class="rounded-circle" style="width: 40vw;">
<div class="row ion-text-left">
<div class="col">
<h3 class="fw-bold">Name: </h3>
</div>
<div class="col">
<h3 class="fw-bold">{{name}}</h3>
</div>
</div>
<div class="row ion-text-left">
<div class="col">
<h3 class="fw-bold">Age: </h3>
</div>
<div class="col">
<h3 class="fw-bold">{{age}} years</h3>
</div>
</div>
<div class="row ion-text-left">
<div class="col">
<h3 class="fw-bold">Gender: </h3>
</div>
<div class="col">
<h3 class="fw-bold">{{gender == 0 ? 'Male':'Female'}}</h3>
</div>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col">
<div class="d-grid gap-2 mt-2">
<button class="btn btn-lg btn-secondary" type="button" style="background-color: #5b628f" [routerLink]="['/skin-disease-take-image']">Skin disease detection</button>
</div>
</div>
<div class="col">
<div class="d-grid gap-2 mt-2">
<button class="btn btn-lg btn-secondary" type="button" style="background-color: #5b628f" [routerLink]="['/diet-plan']">Diet and exercise</button>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col">
<div class="d-grid gap-2 mt-2">
<button class="btn btn-lg btn-secondary" type="button" style="background-color: #5b628f" [routerLink]="['/chatbot-start']">Disease prediction</button>
</div>
</div>
<div class="col">
<div class="d-grid gap-2 mt-2">
<button class="btn btn-lg btn-secondary" type="button" style="background-color: #5b628f" [routerLink]="['/problem-submit']">Knowledge <br> base</button>
</div>
</div>
</div>
</div>
</div>
</div>
</ion-content>
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
import { PetPagePage } from './pet-page.page';
describe('PetPagePage', () => {
let component: PetPagePage;
let fixture: ComponentFixture<PetPagePage>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ PetPagePage ],
imports: [IonicModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(PetPagePage);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-pet-page',
templateUrl: './pet-page.page.html',
styleUrls: ['./pet-page.page.scss'],
})
export class PetPagePage implements OnInit {
name: string;
age: number;
gender: number;
constructor() { }
ngOnInit() {
this.name = localStorage.getItem('name');
this.age = Number(localStorage.getItem('age'));
this.gender = Number(localStorage.getItem('gender'));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment