What do you want to save?
Add Code snippet
New code examples
-
Other 2022-03-02 10:45:10
button routing
<button type="button" class="btn btn-primary-outline pull-right" (click)="btnClick();"><i class="fa fa-plus"></i> Add</button> // myComponent.component.ts file import { Router } from '@... Add solution -
Javascript 2022-03-02 09:40:08
nangular make window available
import { Inject } from '@angular/core'; import { DOCUMENT } from '@angular/common'; export class MyClass { constructor(@Inject(DOCUMENT) private document: Document) { this.window = this.document.defaultView; } check() { console.log(this.... Add solution -
Javascript 2022-03-01 06:25:09
getting view height dynamically in react native
import React, { Component } from 'react'; import ReactNative, { AppRegistry, View, TouchableOpacity, findNodeHandle, Text, StyleSheet } from 'react-native'; export default class App extends Component { constructor() { super(); this.state = {... Add solution -
TypeScript 2022-02-28 17:05:12
Cannot read property 'bypassSecurityTrustResourceUrl'
// This error is not about what you pass as an argument, // but about the sanitizer. // You need to make sure to import and declare the sanitizer // in your constructor like this: import { DomSanitizer} from '@angular/platform-browser'; ... construct... Add solution -
TypeScript 2022-02-26 12:35:16
typescript readonly
class Octopus { readonly name: string; readonly numberOfLegs: number = 8; constructor(theName: string) { this.name = theName; }} let dad = new Octopus("Man with the 8 strong legs");dad.name = "Man with the 3-piece suit";Cannot ... Add solution -
TypeScript 2022-02-25 12:45:03
mat datepicker timezone not correct
import { Inject, Injectable, Optional } from '@angular/core'; import { MAT_DATE_LOCALE } from '@angular/material'; import { MomentDateAdapter } from '@angular/material-moment-adapter'; import { Moment } from 'moment'; import * as moment from 'moment'; ... Add solution -
Javascript 2022-02-25 06:45:06
angular x social login
import { SocialAuthService } from "angularx-social-login";import { FacebookLoginProvider, GoogleLoginProvider } from "angularx-social-login"; @Component({ sel... Add solution -
TypeScript 2022-02-22 21:20:03
mat input datetime-local now
@Component({ selector: 'app', template: `<input type="datetime-local" [value]="date" (change)="date=$event.target.value" /> {{date}}` }) export class AppComponent { date: string; constructor(... Add solution
Best helpers
Ranking is empty