What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2022-03-07 13:00:10
get data from json file angular
/*--IN THE TS OF THE COMPONENT--*/ //In imports section import variableName from '../../assets/fileName.json'; //In the class part of the same file export class AppComponent { //This variable will have all the values public nameList:{field1:type, fie... Add solution -
Javascript 2022-03-05 11:10:45
@react-google-maps/api npm
import {Map, InfoWindow, Marker, GoogleApiWrapper} from 'google-maps-react'; export class MapContainer extends Component { render() { return ( <Map google={this.props.google} zoom={14}> <Marker onClick={this.onMarkerClick} ... Add solution -
TypeScript 2022-03-04 02:10:01
Warning: Flex Layout loaded on the server without FlexLayoutServerModule
//app.server.module.ts import {NgModule} from '@angular/core'; import {FlexLayoutServerModule} from '@angular/flex-layout/server'; @NgModule({ imports: [ ... other imports here FlexLayoutServerModule, ] }) export class AppServerModule {} //a... 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 -
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 -
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 -
TypeScript 2022-02-20 04:40:13
angluar cannot declare '' in an ngmodule as its not part of the current compilation
// Remove your module from declarations and add it to imports @NgModule({ declarations: [ SomeComponent, // SharedModule, <-- remove module from declarations ], imports: [ SharedModule, // <-- add to imports ], }) export class Y... Add solution