This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"editor.fontLigatures": true, | |
"editor.fontFamily": "Fira Code", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shallowCopyExample() { | |
let product = { | |
name: 'beef', | |
price: 10, | |
category: { | |
name: 'food', | |
type: 'meat' | |
} | |
}; | |
let shallowCopyOfProduct = product; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deepCopyExample() { | |
let product = { | |
name: 'beef', | |
price: 10, | |
category: { | |
name: 'food', | |
type: 'meat' | |
} | |
}; | |
let deepCopyOfProduct = JSON.parse(JSON.stringify(product)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<link rel="stylesheet" type="text/css" href="mystyle.css"> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<link rel="import" href="/path/to/some/import.html"> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var marker = google.maps.Marker(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@NgModule({ | |
imports: [ | |
MapModule.forRoot({ | |
key: 'mykeyId' | |
}) | |
], | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class MapModule { | |
static forRoot(mapConfig: IMapsConfig): ModuleWithProviders { | |
return { | |
ngModule: MapModule, | |
providers: [ {provide: MapsConfig, useValue: mapConfig} ] | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface IMapsConfig { | |
key: string; | |
} |
OlderNewer