Skip to content

Instantly share code, notes, and snippets.

View PetraSp's full-sized avatar

Petra Spirkova PetraSp

  • Zürich
View GitHub Profile
const logger = (strings, ...values) => {
var str = '';
for (let i = 0; i < strings.length; i++) {
if (i > 0) {
if (values[i-1] && typeof values[i-1] == "object") {
if (values[i-1] instanceof Error) {
if (values[i-1].stack) {
str += values[i-1].stack;
continue;
}
colors.forEach(function(color) {console.log(color) })
var numbers = [1,2,3]
var sum = 0;
numbers.forEach(adder)
function adder(num) {
sum += num
return sum
}
function getTime() {
return (new Date()).toLocaleTimeString()
}
new Date().getMonth()
npm i --save faker
import faker from 'faker';
https://stackoverflow.com/questions/38394015/how-to-pass-data-from-child-component-to-its-parent-in-reactjs
https://favicon.io/emoji-favicons/bread/
https://zedbi.azurewebsites.net/View-a-websites-color-scheme#!url=www.badi.com&css=https%3A%2F%2Fd1v3slut4s2mfy.cloudfront.net%2F0d3f0cc189602fedba492526607b10ebc7bc8678%2Fstyles.css&ignore=0
***Destructuring
props.data.title
const { data } = props;
data.title
const appRoutes: Routes = [
 {
 path: '', component: ShellComponent,
 children: [
 { path: 'welcome', component: WelcomeComponent },
 { path: '', redirectTo: 'welcome', pathMatch: 'full' },
 { path: '**', component: PageNotFoundComponent }
 ]
 },
];
RouterModule.forRoot([
 { 
 path: 'prayers', 
 loadChildren: './prayers/prayers.module#PrayersModule'
 },
 ]),
<pp-menu></pp-menu>
<div class='container main-content'>
 <router-outlet></router-outlet>
</div>
<router-outlet></router-outlet>
@NgModule({
 declarations: [],
 
 imports: [
 BrowserModule,
 SharedModule,
 UserModule,
 AppRoutingModule,
 ],
 
[
 { path: 'welcome', component: WelcomeComponent },
 { path: '', redirectTo: 'welcome', pathMatch: 'full' },
 { path: '**', component: PageNotFoundComponent }
]