Skip to content

Instantly share code, notes, and snippets.

View ngohungphuc's full-sized avatar
🏡
Sài Gòn & Lelystad

Tony Ngo ngohungphuc

🏡
Sài Gòn & Lelystad
View GitHub Profile
@model IEnumerable<BackgroundService.Services.ExampleGuid>
@{
ViewData["Title"] = "ExampleGuids";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>ExampleGuids</h2>
<table class="table">
import {Action} from '@ngrx/store';
export enum PortalActionTypes {
ADD_COMMENT = '[PORTAL] ADD_COMMENT'
}
export class AddComment implements Action {
readonly type = PortalActionTypes.ADD_COMMENT;
constructor(public payload: string) {}
}
import {PortalActionsUnion, PortalActionTypes} from '../actions/portal.actions';
export interface PortalState {
comment: string;
}
export const initialState: PortalState = {
comment: 'some comments'
};
import * as fromPortal from './reducers/portal.reducers';
import * as fromRoot from '@core/store/reducers/index';
import { PortalState } from './reducers/portal.reducers';
import { createFeatureSelector, createSelector } from '@ngrx/store';
export interface State extends fromRoot.State {
portal: PortalState;
}
constructor(
private fb: FormBuilder,
private store: Store<AuthState>,
private portalStore: Store<PortalState>) {}
ngOnInit() {
this
.store
.select(selectIsLoginState)
.subscribe(res => {
import { Component, OnInit } from "@angular/core";
@Component({
selector: "app",
templateUrl: "./app.component.html",
styleUrls: ["./app.component.scss"]
})
export class AppComponent implements OnInit {
public ngOnInit() {
if ("serviceWorker" in navigator) {
var cacheName = "app-cache-v1";
self.addEventListener("install", event => {
event.waitUntil(
caches
.open(cacheName)
.then(cache =>
cache.addAll([
"./dist/vendor.css",
"./css/site.min.css",
var cacheName = "app-cache-v1";
var offlineUrl = "./offline.html";
self.addEventListener("install", event => {
event.waitUntil(
caches
.open(cacheName)
.then(cache =>
cache.addAll([
"./dist/vendor.css",
<ItemGroup>
<PackageReference Include="IdentityServer4" Version="2.3.2" />
<PackageReference Include="IdentityServer4.AspNetIdentity" Version="2.3.0" />
<PackageReference Include="IdentityServer4.EntityFramework" Version="2.3.2" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.0" />
</ItemGroup>
public class ApplicationDbContext : IdentityDbContext
{
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options) { }
}