This file contains hidden or 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
| 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; | |
| } |
This file contains hidden or 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
| 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 | |
| } |
This file contains hidden or 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
| function getTime() { | |
| return (new Date()).toLocaleTimeString() | |
| } | |
| new Date().getMonth() | |
| npm i --save faker | |
| import faker from 'faker'; | |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| const appRoutes: Routes = [ | |
| { | |
| path: '', component: ShellComponent, | |
| children: [ | |
| { path: 'welcome', component: WelcomeComponent }, | |
| { path: '', redirectTo: 'welcome', pathMatch: 'full' }, | |
| { path: '**', component: PageNotFoundComponent } | |
| ] | |
| }, | |
| ]; |
This file contains hidden or 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
| RouterModule.forRoot([ | |
| { | |
| path: 'prayers', | |
| loadChildren: './prayers/prayers.module#PrayersModule' | |
| }, | |
| ]), |
This file contains hidden or 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
| <pp-menu></pp-menu> | |
| <div class='container main-content'> | |
| <router-outlet></router-outlet> | |
| </div> |
This file contains hidden or 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
| <router-outlet></router-outlet> |
This file contains hidden or 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({ | |
| declarations: [], | |
| imports: [ | |
| BrowserModule, | |
| SharedModule, | |
| UserModule, | |
| AppRoutingModule, | |
| ], | |
This file contains hidden or 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
| [ | |
| { path: 'welcome', component: WelcomeComponent }, | |
| { path: '', redirectTo: 'welcome', pathMatch: 'full' }, | |
| { path: '**', component: PageNotFoundComponent } | |
| ] |