-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add image to userlogin page add course service
- Loading branch information
1 parent
c6e9cd2
commit 1fb640d
Showing
13 changed files
with
132 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,33 @@ | ||
<ion-header> | ||
<ion-toolbar> | ||
<ion-title>courseLanding</ion-title> | ||
<ion-buttons> | ||
<ion-back-button></ion-back-button> | ||
</ion-buttons> | ||
<ion-title slot="secondary">{{thisCourse}} Course</ion-title> | ||
</ion-toolbar> | ||
</ion-header> | ||
|
||
<ion-content> | ||
<ion-card> | ||
<ion-card-header> | ||
<ion-card-title>{{thisCourse}} Course Progress</ion-card-title> | ||
</ion-card-header> | ||
<ion-card-content> | ||
<h1>Module Completion</h1> | ||
<h1>Quiz Completion</h1> | ||
</ion-card-content> | ||
</ion-card> | ||
<ion-grid> | ||
<ion-row> | ||
<ion-col> | ||
<ion-button expand="block">Continue Module</ion-button> | ||
</ion-col> | ||
</ion-row> | ||
<ion-row> | ||
<ion-col> | ||
<ion-button expand="block">Take Quiz</ion-button> | ||
</ion-col> | ||
</ion-row> | ||
</ion-grid> | ||
|
||
</ion-content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { Subscription } from 'rxjs'; | ||
import { CourseService } from './course.service'; | ||
|
||
@Component({ | ||
selector: 'app-course-landing', | ||
templateUrl: './course-landing.page.html', | ||
styleUrls: ['./course-landing.page.scss'], | ||
}) | ||
export class CourseLandingPage implements OnInit { | ||
|
||
constructor() { } | ||
thisCourse: String; | ||
thisCourseChanged: Subscription; | ||
constructor(private courseService: CourseService) { } | ||
|
||
ngOnInit() { | ||
this.thisCourse = this.courseService.thisCourse | ||
this.thisCourseChanged = this.courseService.courseChange | ||
.subscribe(course => { | ||
this.thisCourse = course; | ||
}) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { TestBed } from '@angular/core/testing'; | ||
|
||
import { CourseService } from './course.service'; | ||
|
||
describe('CourseService', () => { | ||
let service: CourseService; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({}); | ||
service = TestBed.inject(CourseService); | ||
}); | ||
|
||
it('should be created', () => { | ||
expect(service).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Injectable, OnInit } from '@angular/core'; | ||
import { Subject } from 'rxjs'; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class CourseService implements OnInit { | ||
allCourses = ["AIDA1","AIDA2","AIDA3","AIDA4","AIDA Instructor"] | ||
thisCourse: String; | ||
courseChange: Subject<String>; | ||
constructor() {} | ||
|
||
ngOnInit(){ | ||
this.courseChange.next(this.getCourse()) | ||
} | ||
|
||
getCourse() { | ||
return this.thisCourse | ||
} | ||
setCourse(course) { | ||
this.thisCourse = course | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ const routes: Routes = [ | |
{ | ||
path: '', | ||
component: LandingPage | ||
} | ||
}, | ||
]; | ||
|
||
@NgModule({ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
<ion-header> | ||
<ion-toolbar> | ||
<ion-title><p align="center">Apnea Elearning</p></ion-title> | ||
<ion-button size="small" color="dark" fill="clear" slot="end"><ion-icon slot="icon-only" name="ellipsis-vertical-outline"></ion-icon></ion-button> | ||
</ion-toolbar> | ||
</ion-header> | ||
|
||
<ion-content> | ||
<ion-grid> | ||
<ion-row><hr></ion-row> | ||
<ion-row> | ||
<ion-label (click)="tester()" align="center">Welcome <ion-text color="secondary"><span>{{username}}</span></ion-text> to your Apnea Elearning App.</ion-label> | ||
<ion-label align="center">Welcome <ion-text color="secondary"><span>{{username}}</span></ion-text> to your Apnea Elearning App.</ion-label> | ||
</ion-row> | ||
<hr> | ||
<ion-row> | ||
<p align="center">To get started, select an available course from below</p> | ||
</ion-row> | ||
<ion-row *ngFor="let course of availableCourses; index as i"> | ||
<ion-col><ion-button expand="full"> {{course}} </ion-button></ion-col> | ||
<ion-col><ion-button (click)="onSelectCourse(course)" expand="block"> {{course}} </ion-button></ion-col> | ||
</ion-row> | ||
</ion-grid> | ||
</ion-content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,33 @@ | ||
<ion-header> | ||
<ion-toolbar> | ||
<ion-title>login</ion-title> | ||
<ion-title><p align="center">User Login</p></ion-title> | ||
</ion-toolbar> | ||
</ion-header> | ||
|
||
<ion-item> | ||
<ion-label position="floating" for="username">Username</ion-label> | ||
<ion-input ngModel #username id="username" type="text"></ion-input> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label position="floating" for="password">Password</ion-label> | ||
<ion-input ngModel #password id="password" type="text"></ion-input> | ||
</ion-item> | ||
<ion-button expand="full" (click)="login()">Login</ion-button> | ||
|
||
|
||
|
||
<ion-content> | ||
<div align="center" class="ion-margin-top"> | ||
<ion-label class="ion-padding">Welcome to Apnea E-Learning</ion-label> | ||
<img class="ion-padding" src=\..\..\..\..\assets\img\maskimage.png width="50%"> | ||
</div> | ||
<div align="center" class="ion-margin-bottom"> | ||
<ion-label>Enter your details to begin</ion-label> | ||
</div> | ||
|
||
<ion-list> | ||
<ion-item> | ||
<ion-label position="floating" for="username">Username</ion-label> | ||
<ion-input ngModel #username id="username" type="text"></ion-input> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label position="floating" for="password">Password</ion-label> | ||
<ion-input ngModel #password id="password" type="text"></ion-input> | ||
</ion-item> | ||
</ion-list> | ||
<hr> | ||
<div align="center"> | ||
<ion-button expand="block" (click)="login()">LOGIN</ion-button> | ||
<ion-item *ngIf="incorrectPassword"> | ||
<p >Incorrect details, please try again</p> | ||
</ion-item > | ||
</div> | ||
</ion-content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
/// <reference path="..\.vscode\typings\cordova-ionic\plugins\keyboard.d.ts"/> | ||
/// <reference path="..\.vscode\typings\jquery\jquery.d.ts"/> |