This file contains hidden or 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
import { Injectable } from '@angular/core'; | |
import { Router, CanActivate } from '@angular/router'; | |
import { Events } from '@ionic/angular' | |
@Injectable() | |
export class AuthGuardService implements CanActivate { | |
signedIn: boolean; | |
constructor(public router: Router, public events: Events) { |
This file contains hidden or 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
import { Component, OnInit, Input } from '@angular/core'; | |
import { ModalController, Events } from '@ionic/angular'; | |
// import { ListItemModal } from './list.item.modal'; | |
import { ToDoItem, ToDoList } from '../../classes/item.class'; | |
@Component({ | |
selector: 'app-list-page', | |
templateUrl: 'list.page.html' | |
}) | |
export class ListPage implements OnInit { |
This file contains hidden or 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
.hover { | |
cursor: pointer; | |
} | |
.complete { | |
color: green; | |
} | |
.card-title { | |
margin: 12px 0 0 12px !important; | |
} |
This file contains hidden or 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
<ion-header> | |
<ion-toolbar> | |
<ion-title *ngIf="user"> | |
{{user.username + '\'s list' }} | |
</ion-title> | |
<ion-buttons slot="end"> | |
<ion-button (click)="modify(null, null)">Add Item</ion-button> | |
</ion-buttons> | |
</ion-toolbar> | |
</ion-header> |
This file contains hidden or 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
import { NgModule } from '@angular/core'; | |
import { CommonModule } from '@angular/common'; | |
import { FormsModule } from '@angular/forms'; | |
import { IonicModule } from '@ionic/angular'; | |
import { ListPage } from './list.page'; | |
import { ListItemModal } from './list.item.modal'; | |
@NgModule({ | |
imports: [ | |
CommonModule, |
This file contains hidden or 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
import { Component, OnInit } from '@angular/core'; | |
import { ModalController } from '@ionic/angular'; | |
import { ToDoItem, ToDoList } from '../../classes/item.class'; | |
@Component({ | |
selector: 'item-modal', | |
templateUrl: 'list.item.modal.html', | |
}) | |
export class ListItemModal implements OnInit { |
This file contains hidden or 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
<ion-header> | |
<ion-toolbar> | |
<ion-title>{{editItem ? 'Edit' : 'Create'}} Item</ion-title> | |
</ion-toolbar> | |
</ion-header> | |
<ion-content> | |
<ion-list lines="true"> | |
<ion-item> | |
<ion-label color="primary">ToDo Title </ion-label> | |
<ion-input placeholder="title" [(ngModel)]="item.title"></ion-input> |
This file contains hidden or 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
import { v4 as uuid } from 'uuid'; | |
export class ToDoList { | |
userId: any; | |
items: Array<ToDoItem> | |
constructor(params){ | |
this.items = params.items || []; | |
this.userId = params.userId; | |
} |
This file contains hidden or 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
import { IonicModule } from '@ionic/angular'; | |
import { RouterModule } from '@angular/router'; | |
import { NgModule } from '@angular/core'; | |
import { CommonModule } from '@angular/common'; | |
import { FormsModule } from '@angular/forms'; | |
import { HomePage } from './home.page'; | |
import { AmplifyAngularModule, AmplifyIonicModule, AmplifyService } from 'aws-amplify-angular' | |
@NgModule({ | |
imports: [ |
This file contains hidden or 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
import { Component, OnInit, Input } from '@angular/core'; | |
import { ModalController, Events } from '@ionic/angular'; | |
import { AmplifyService } from 'aws-amplify-angular' | |
//import { ListItemModal } from './list.item.modal'; | |
import { ToDoItem, ToDoList } from '../../classes/item.class'; | |
@Component({ | |
selector: 'app-list-page', | |
templateUrl: 'list.page.html' | |
}) | |
export class ListPage implements OnInit { |
OlderNewer