Skip to content

Instantly share code, notes, and snippets.

View refactor.ts
export interface IHuman {
name: string;
age: string;
location: string;
height: string;
}
function outputInformation(name: string, age: string, location: string, height: string, isMale: boolean = false) {
console.log(`Name: ${name}, Age: ${age}, Location: ${location}, Height: ${height}, isMale: ${isMale}`);
}
View main.js
var express = require('express');
var ParseServer = require('parse-server').ParseServer;
var ParseDashboard = require('parse-dashboard');
var api = new ParseServer({
// Parse Server settings
});
var options = { allowInsecureHTTP: false };
View plan-code.html
<style>
.controls {
display: none;
}
@media (max-width: 800px) {
.plan {
display: none;
}
View categories.page.html
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<ion-menu-button></ion-menu-button>
</ion-buttons>
<ion-title>
List
</ion-title>
</ion-toolbar>
</ion-header>
View categories.page.ts
import { Observable } from "rxjs";
import { PostsService } from "./../posts.service";
import { Component, OnInit } from "@angular/core";
@Component({
selector: "app-list",
templateUrl: "categories.page.html",
styleUrls: ["categories.page.scss"]
})
export class CategoriesPage implements OnInit {
View home.page.scss
.readmore {
display: none;
}
.featured-image {
max-height: 150px;
margin-left: auto;
margin-right: auto;
}
View home.page.html
<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>
View home.page.ts
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",
View post-detail.page.scss
.featured_image {
max-width: 100%;
max-height: 200px;
}
View post-detail.page.html
<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>
You can’t perform that action at this time.