Skip to content

Commit

Permalink
fix: minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
codediodeio committed Aug 18, 2018
1 parent 3e765e7 commit e1c75d9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Ionic Master Course
1 change: 1 addition & 0 deletions src/app/guards/tutorial.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export class TutorialGuard implements CanActivate {
state: RouterStateSnapshot
): Promise<boolean> {
const isComplete = await this.storage.get('tutorialComplete');

if (!isComplete) {
this.router.navigateByUrl('/tutorial');
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/tutorial/tutorial.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h1>Watch the Videos</h1>
<ion-img src="/assets/slides/step3.svg"></ion-img>
<h1>Deploy your Own</h1>
<p>
Build and deploy your own app as a PWA or native app to Apple and Google Play
Build and deploy your own app to the web, Apple App Store, and Google Play
</p>

<ion-button (click)="finish()">Sounds Awesome!</ion-button>
Expand Down
2 changes: 0 additions & 2 deletions src/app/tutorial/tutorial.page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ ion-slide {
height: 100vh;
flex-direction: column;
text-align: justify;
font-size: 1.2em;
}

ion-img {
top: 0;
max-width: 50vw;
max-height: 50vh;
overflow: hidden;
Expand Down
6 changes: 2 additions & 4 deletions src/app/tutorial/tutorial.page.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Component, ViewChild } from '@angular/core';
import { Storage } from '@ionic/storage';
import { Router } from '@angular/router';

Expand All @@ -9,14 +9,12 @@ import { Slides } from '@ionic/angular';
templateUrl: './tutorial.page.html',
styleUrls: ['./tutorial.page.scss']
})
export class TutorialPage implements OnInit {
export class TutorialPage {
constructor(private storage: Storage, private router: Router) {}

@ViewChild(Slides)
slides: Slides;

ngOnInit() {}

async finish() {
await this.storage.set('tutorialComplete', true);
this.router.navigateByUrl('/');
Expand Down

0 comments on commit e1c75d9

Please sign in to comment.