Skip to content

Instantly share code, notes, and snippets.

Avatar
🌴
On vacation

TAKUYA NAKAYASU takuya-nakayasu

🌴
On vacation
View GitHub Profile
View ng_if.ts
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {Directive, EmbeddedViewRef, Input, TemplateRef, ViewContainerRef, ɵstringify as stringify} from '@angular/core';
View string.validator.spec.ts
import { Component, OnInit } from '@angular/core';
/**
* This is unit test code for StringValidator using karma.
*/
import { ComponentFixture, TestBed } from '@angular/core/testing';
import {
FormBuilder,
FormGroup,
FormsModule,
ReactiveFormsModule
@takuya-nakayasu
takuya-nakayasu / login.page.html
Last active Oct 31, 2020
「SpeedWeight」のログイン画面
View login.page.html
<ion-header>
<ion-toolbar>
<ion-title></ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-card>
<ion-card-header>
<ion-card-title class="card-title">ログイン</ion-card-title>
@takuya-nakayasu
takuya-nakayasu / terms-of-service.page.html
Created Oct 31, 2020
「SpeedWeight」の利用規約
View terms-of-service.page.html
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<ion-back-button></ion-back-button>
</ion-buttons>
<ion-title>利用規約</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
@takuya-nakayasu
takuya-nakayasu / privacy-policy.page.html
Last active Oct 31, 2020
「SpeedWeight」のプライバシーポリシー
View privacy-policy.page.html
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<ion-back-button></ion-back-button>
</ion-buttons>
<ion-title>プライバシーポリシー</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
@takuya-nakayasu
takuya-nakayasu / spinner-interceptor.ts
Created Sep 22, 2019
スピナーの表示・非表示を制御するインターセプター
View spinner-interceptor.ts
import { Injectable } from '@angular/core';
import {
HttpEvent,
HttpInterceptor,
HttpHandler,
HttpRequest
} from '@angular/common/http';
import { Observable } from 'rxjs';
import { finalize } from 'rxjs/operators';
import { SpinnerService } from './spinner.service';
@takuya-nakayasu
takuya-nakayasu / spinner.service.ts
Created Sep 22, 2019
スピナーのサービスクラス
View spinner.service.ts
import { Injectable } from '@angular/core';
import { Subject } from 'rxjs';
/**
* スピナーの表示を制御するサービス
*
* @export
* @class SpinnerService
*/
@Injectable()
@takuya-nakayasu
takuya-nakayasu / spinner.component.html
Created Sep 22, 2019
スピナーコンポーネントクラスのテンプレートファイル
View spinner.component.html
<div *ngIf="isLoading | async" class="overlay">
<mat-progress-spinner class="spinner" [color]="color" [mode]="mode" [value]="value"></mat-progress-spinner>
</div>
@takuya-nakayasu
takuya-nakayasu / spinner.component.scss
Created Sep 22, 2019
スピナーコンポーネントクラスのSCSSファイル
View spinner.component.scss
.overlay {
position: fixed;
display: block;
width: 100%;
height: 100%;
top: 0;
left: 0;
background-color: rgba(74, 74, 74, .4);
z-index: 99999;
}
@takuya-nakayasu
takuya-nakayasu / spinner.component.ts
Created Sep 22, 2019
スピナーのコンポーネントクラス
View spinner.component.ts
import { Component } from '@angular/core';
import { Subject } from 'rxjs';
import { SpinnerService } from '../../services/spinner.service';
@Component({
selector: 'app-spinner',
templateUrl: './spinner.component.html',
styleUrls: ['./spinner.component.scss']
})
export class SpinnerComponent {