What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-08 05:10:02
how to check if a binary tree is a binary search tree
class BTNode { constructor(value) { this.value = value; this.left = null; this.right = null; } } /** * * @param {BTNode} tree * @returns {Boolean} */ const isBinarySearchTree = (tree) => { if (tree) { if ( tree.left &am... Add solution -
Javascript 2021-09-07 23:41:02
how to add toaster in angular 9
npm install ngx-toastr --save npm install @angular/animations --save // angular.json "styles": [ "styles.scss", "node_modules/ngx-toastr/toastr.css" // try adding '../' if you're // using angular cli before ... Add solution -
Javascript 2021-09-07 19:16:02
redirect angular
import { RoleComponent } from './role/role.component'; import { AppComponent } from './app.component'; import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; const routes: Routes = [ { path: '', re... Add solution -
Javascript 2021-09-06 23:14:02
Angular 4 execute function from another component
//Angular 4 execute function from another component didn't get time to test it but similar solution worked for me. the code created for your need. Create a service like this import { Injectable } from '@angular/core'; import { Observable } from 'rxjs/... Add solution -
Javascript 2021-09-06 22:51:01
js equivilant of __repr__ python
// Yes, in node.js you can install the "util" module (nodejs api module) // Like this class MyClass { constructor(text) { this.text = text; } [util.inspect.custom]() { return this.text; } } const classInstance = new MyClass("... Add solution -
Javascript 2021-09-06 14:44:02
how to add changes every time you route navigate to page in angular
// Place import at the top import { Router,NavigationStart} from '@angular/router'; //Place the code below inside your class constructor(private router: Router){} ngOnInit(){ this.router.events.subscribe(event =>{ if (event instanceof Naviga... Add solution
Best helpers
Ranking is empty