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
const matcha = (url: UrlSegment[]) => { | |
return url.length === 1 && url[0].path.includes('matcha') | |
? { | |
consumed: url , | |
posParams: { | |
matcha: url[0].path.replace('matcha', '') | |
} | |
} | |
: null; |
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
export type BookActionTypes = '[Book] Add All' | '[Book] Add One' | '[Book] Update One' | '[Book] Delete One'; | |
export class AddAll { | |
readonly type = '[Book] Add All'; | |
constructor(public books: Book[]) {} | |
} | |
export class AddOne { | |
readonly type = '[Book] Add One'; | |
constructor(public book: Book) {} |
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
const getErrMsgFromValidationError = ( | |
key: string, | |
error: ValidationError | |
): string => { | |
const errorMapper = { | |
maxlength: { | |
keys: ["requiredLength", "actualLength"], | |
msg: (requiredLength, actualLength) => | |
`Text darf nur ${requiredLength} Zeichen lang sein.`, |
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
const asyncNameValidator = (service: Service): AsyncValidatorFn => ( | |
control: AbstractControl | |
): Observable<ValidationErrors | null> => { | |
return timer(500).pipe( | |
switchMap(() => { | |
return service.validateName(control.value).pipe( | |
map((valid: boolean) => valid ? null:({ name: 'Name not Valid' }) ) | |
); | |
}), |
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
<span>{{ title }} app is running!</span> | |
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
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,(function(t){return e[t]}).bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}({2:function(e,t,n){e.exports=n("hN/g")},"hN/g":function(e,t,n){"use strict";n.r(t),n("nf2o")},nf2o:function(e,t |