What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-18 16:55:24
post http with ionic
import { Component, OnInit } from '@angular/core'; import { HttpClient, Headers, RequestOptions } from '@angular/common/http'; @Component({ selector: 'app-home', templateUrl: 'home.page.html', styleUrls: ['home.page.scss'], }) export class HomePage... Add solution -
Javascript 2021-11-17 19:23:20
either function monad in javascript
class Monad { // pure :: a -> M a pure = () => { throw "pure method needs to be implemented" } // flatMap :: # M a -> (a -> M b) -> M b flatMap = (x) => { throw "flatMap method needs to be implemented" } ... Add solution -
Javascript 2021-11-17 14:59:20
subject in angular 8
import { Injectable } from '@angular/core'; import { Observable, Subject } from 'rxjs'; @Injectable({ providedIn: 'root' }) export class MessageService { private subject = new Subject<any>(); sendMessage(message: string) { this.sub... Add solution -
Other 2021-11-16 19:42:20
@Inject(PLATFORM_ID)private platformId
component.ts import { Component, Inject } from '@angular/core'; import { PLATFORM_ID } from '@angular/core'; import { isPlatformBrowser } from '@angular/common'; @Component({ selector: 'mySpecial', templateUrl: './mySpecial.component.html' }) export... Add solution -
Javascript 2021-11-15 09:26:54
angular http error handling
// src/app/services/interceptor.service.ts import { Injectable } from '@angular/core'; import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent, HttpErrorResponse } from '@angular/common/http'; import { Observable, throwEr... Add solution -
TypeScript 2021-11-13 12:48:12
maticons .svg
import { Component } from "@angular/core"; import { MatIconRegistry } from "@angular/material/icon"; import { DomSanitizer } from "@angular/platform-browser"; @Component({ selector: "app-root", templateUrl: &qu... Add solution