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
export function LoadingIndicator(): MethodDecorator { | |
return function (target: Object, propertyKey: string | symbol, descriptor) { | |
const originalMethod = descriptor.value; | |
descriptor.value = function (...args) { | |
// Inject your show loading function HERE | |
const subs = originalMethod.apply(this, args); | |
// If it's using do operator | |
if (subs.subscribe) { |
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
@LoadingIndicator() | |
checkTransaction(tran: Transaction) { | |
return this._checkoutService.checkBbsTransaction(tran) | |
.map(res => res.json()) | |
.subscribe(res => { | |
if (AuthHelper.isLoggedIn()) { | |
this.router.navigate(['my-orders']); | |
} else { | |
this.message = tran.transactionId; | |
this.isSuccess = true; |
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
form: FormGroup; | |
constructor( | |
private fb: FormBuilder | |
) { } | |
ngOnInit() { | |
this.form = this.fb.group({ | |
type: [1, Validators.required], | |
house: ['',Validators.required], |
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'; | |
require('style-loader!./lib/quill.bubble.css'); | |
require('style-loader!./lib/quill.snow.css'); | |
@Component({ | |
selector: 'app-agency-term', | |
templateUrl: './agency-term.component.html', | |
styleUrls: ['./agency-term.component.scss'] | |
}) |
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
{"posts":[{"a":1,"b":2,"__id":"jgm1lltd"},{"a":4,"b":3,"__id":"jgm1mzv5"},{"a":10,"b":3,"__id":"jgm1we7z"}]} |
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
<script src="https://nt.codfee.xyz/embed/release/index.min.js"></script> | |
<script> | |
new __NotifyService({ | |
key: '<your-key-herer>' | |
}); | |
</script> |
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
public partial class Startup | |
{ | |
public Startup(IHostingEnvironment env) | |
{ | |
var builder = new ConfigurationBuilder() | |
.SetBasePath(env.ContentRootPath) | |
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: false, reloadOnChange: true) | |
.AddEnvironmentVariables(); | |
Configuration = builder.Build(); | |
} |
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
FROM microsoft/aspnetcore-build:2.0 AS build-env | |
WORKDIR /app | |
# Copy csproj and restore as distinct layers | |
COPY *.csproj ./ | |
RUN dotnet restore | |
# Copy everything else and build | |
COPY . ./ | |
RUN dotnet publish -c Release -o out |
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
version: '3' | |
services: | |
staging.api: | |
build: . | |
ports: | |
- "5000:80" | |
environment: | |
- ASPNETCORE_ENVIRONMENT=Staging | |
production.api: |
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
export const environment = { | |
production: true, | |
config: { | |
host: 'https://api.xxx.xxx/api' | |
// more config | |
} | |
}; |
OlderNewer