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
<ion-header> | |
<ion-toolbar> | |
<ion-buttons slot="start"> | |
<ion-menu-button></ion-menu-button> | |
</ion-buttons> | |
<ion-title> | |
Home | |
</ion-title> | |
</ion-toolbar> | |
</ion-header> |
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
import { PostsService } from "./../posts.service"; | |
import { Component, OnInit } from "@angular/core"; | |
import { Observable } from "rxjs"; | |
import { Router } from "@angular/router"; | |
import { ActivatedRoute, ParamMap } from "@angular/router"; | |
import { switchMap } from "rxjs/operators"; | |
@Component({ | |
selector: "app-home", | |
templateUrl: "home.page.html", |
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
.featured_image { | |
max-width: 100%; | |
max-height: 200px; | |
} |
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
<ion-header> | |
<ion-toolbar> | |
<ion-buttons slot="start"> | |
<ion-menu-button></ion-menu-button> | |
</ion-buttons> | |
<ion-title> | |
Post Detail | |
</ion-title> | |
</ion-toolbar> | |
</ion-header> |
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
import { Component, OnInit } from "@angular/core"; | |
import { ActivatedRoute, ParamMap } from "@angular/router"; | |
import { Observable } from "rxjs"; | |
import { switchMap } from "rxjs/operators"; | |
import { PostsService } from "./../posts.service"; | |
@Component({ | |
selector: "app-post-detail", | |
templateUrl: "./post-detail.page.html", | |
styleUrls: ["./post-detail.page.scss"] |
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
ionic serve --lab |
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
import { NgModule } from "@angular/core"; | |
import { Routes, RouterModule } from "@angular/router"; | |
const routes: Routes = [ | |
{ | |
path: "", | |
redirectTo: "home", | |
pathMatch: "full" | |
}, | |
{ |
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
import { HttpClientModule } from "@angular/common/http"; | |
import { NgModule } from "@angular/core"; | |
import { BrowserModule } from "@angular/platform-browser"; | |
import { RouteReuseStrategy } from "@angular/router"; | |
import { SplashScreen } from "@ionic-native/splash-screen/ngx"; | |
import { StatusBar } from "@ionic-native/status-bar/ngx"; | |
import { IonicModule, IonicRouteStrategy } from "@ionic/angular"; | |
import { AppRoutingModule } from "./app-routing.module"; | |
import { AppComponent } from "./app.component"; |
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
import { Injectable } from "@angular/core"; | |
import { HttpClient } from "@angular/common/http"; | |
import { map } from "rxjs/operators"; | |
import get from "lodash/get"; | |
@Injectable({ | |
providedIn: "root" | |
}) | |
export class PostsService { |
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
npm install lodash --save |