What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-12 11:05:01
Expected a state variable declaration. If you intended this as a fallback function or a function to handle plain ether transactions, use the "fallback" keyword or the "receive" keyword instead.
pragma solidity >=0.4.22 <0.6.0; contract OwnedToken { // `TokenCreator` is a contract type that is defined below. // It is fine to reference it as long as it is not used // to create a new contract. TokenCreator creator; addres... Add solution -
Javascript 2021-09-11 09:26:02
change boolean value on click react
class Q1 extends Component { constructor(props) { super(props); this.state = { page1: false, page2:false, page3:false } this.handleClick1= this.handleClick1.bind(this); this.handleClick2= this.handleClick2.bind(this); this.hand... Add solution -
Javascript 2021-09-10 17:28:04
angular material open last visited tab
constructor(private route: ActivatedRoute, private router: Router) {} selectedTabIndex: number; ngOnInit(): void { this.selectedTabIndex = parseInt(this.route.snapshot.queryParamMap.get('tab'), 10); // TODO: check upper bound. Material will set th... Add solution -
Javascript 2021-09-10 15:18:03
angular 12 service for create update delete local storage items
import { Injectable } from '@angular/core'; import { Subject } from 'rxjs'; @Injectable({ providedIn: 'root' }) export class LocalStorageService { localStorage: Storage; changes$ = new Subject(); constructor() { this.localStorage = window.lo... Add solution -
Other 2021-09-10 13:43:02
Datepicker ionic
import { DatePicker } from '@ionic-native/date-picker/ngx'; constructor(private datePicker: DatePicker) { } ... this.datePicker.show({ date: new Date(), mode: 'date', androidTheme: this.datePicker.ANDROID_THEMES.THEME_HOLO_DARK }).then( date ... Add solution -
TypeScript 2021-09-09 06:45:03
pass data in route angular
// Send user data let navigationExtras: NavigationExtras = { state: { user: this.user } this.router.navigate(['details'], navigationExtras); // Acess data in details page .... constructor(private route: ActivatedRoute, private router: Router) { th... Add solution -
Other 2021-09-08 18:03:03
lottie npm
import React from 'react'import Lottie from 'react-lottie';import * as animationData from './pinjump.json' export default class LottieControl extends React.Component ... Add solution -
Other 2021-09-08 14:08:02
Back button directive Angular
/** Navigation service ***/ import { Injectable } from '@angular/core' import { Location } from '@angular/common' import { Router, NavigationEnd } from '@angular/router' @Injectable({ providedIn: 'root' }) export class NavigationService { private hist... Add solution
Best helpers
Ranking is empty