Commit ca6ea20d by kevin

firstbuild

parent 0971fb01
......@@ -24,7 +24,7 @@ const routes: Routes = [
loadChildren: './signup/signup.module#SignupPageModule'
},
{
path: 'details',
path: 'details/:id',
loadChildren: './details/details.module#DetailsPageModule'
}
];
......
......@@ -12,33 +12,35 @@
</ion-header>
<ion-content>
<div class="detail_wrapper">
<div *ngIf ="student_details">
<div class="detail_circle_img">
<img src="../../assets/imgs/asset_img1.png">
</div>
<h4>Arnold Schelz</h4>
<h4>{{student_details.first_name}} {{student_details.last_name}}</h4>
<div class="detail_grid">
<ion-row>
<ion-col col>
<p>Student Number</p>
<h3>2455</h3>
<h3>{{student_details.student_number}}</h3>
</ion-col>
<ion-col col>
<p>Graduation Year</p>
<h3>2019</h3>
<h3>{{student_details.graduation_year}}</h3>
</ion-col>
<ion-col col>
<p>Grade</p>
<h3>1</h3>
<h3>{{student_details.grade}}</h3>
</ion-col>
</ion-row>
<ion-row>
<ion-col col>
<p>DOB</p>
<h3>13-05-1996</h3>
<h3>{{student_details.dob}}</h3>
</ion-col>
<ion-col col>
<p>School Name</p>
<h3>EU School</h3>
<h3>{{student_details.school_name}}</h3>
</ion-col>
<ion-col col>
<p>Gender</p>
......@@ -46,6 +48,7 @@
</ion-col>
</ion-row>
</div>
</div>
<div class="detail_listing">
<ul>
<li>
......
import {Component,OnInit, ElementRef, NgZone, ViewChild} from '@angular/core';
import { trigger, transition, animate, style } from '@angular/animations';
import { Router,ActivatedRoute } from '@angular/router';
import { Router, ActivatedRoute } from '@angular/router';
import { MyserviceService} from '../myservice.service'
@Component({
......@@ -20,12 +21,28 @@ import { Router,ActivatedRoute } from '@angular/router';
]
})
export class DetailsPage implements OnInit {
stud1:boolean;
stud2:boolean;
stud3:boolean;
navCtrl: any;
isToggle = false;
constructor() { }
id: any;
student_details:any;
constructor(private route: ActivatedRoute ,private myservice:MyserviceService) {
}
ngOnInit() {
this.id = this.route.snapshot.paramMap.get('id');
console.log(this.id);
this.myservice.presentLoader();
this.myservice.load_get('student_details/id/'+this.id).subscribe(resp =>
{
console.log(resp);
this.student_details=resp;
this.myservice.dismissLoader();
})
}
......
......@@ -19,7 +19,9 @@ export class HomePage {
details
goToPage(path,data){
this.router.navigate(['details']);
console.log(data)
//this.router.navigateByUrl(path);
this.router.navigateByUrl('/details/'+data);
document.body.scrollTop = document.documentElement.scrollTop = 0;
}
get_students_data()
......
......@@ -90,11 +90,11 @@ export class LoginPage implements OnInit {
user_signup()
{
console.log(this.signupForm.value);
// this.myservice.load_post(this.signupForm.value,'login').subscribe(response=>
// {
// console.log(response);
// });
var data =null;
this.myservice.presentToast('Your account has been created successfully');
this.router.navigateByUrl('login',{queryParams:data});
document.body.scrollTop = document.documentElement.scrollTop = 0;
}
}
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