By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
| // Dynamically imported components | |
| const RegisterPage = asyncComponent(() => | |
| import('./register/RegisterPage').then(module => module.default) | |
| ) | |
| const SearchPage = asyncComponent(() => | |
| import('./search/SearchPage').then(module => module.default) | |
| ) | |
| const ReportPage = asyncComponent(() => | |
| import('./report/ReportPage').then(module => module.default) | |
| ) |
| import { Component, OnInit } from '@angular/core'; | |
| declare const iOS: any; | |
| declare const Android: any; | |
| @Component({ | |
| selector: 'app-root', | |
| templateUrl: './app.component.html', | |
| styleUrls: ['./app.component.scss'] | |
| }) |
| Allowed <type> values: | |
| feat (new feature) | |
| fix (bug fix) | |
| docs (changes to documentation) | |
| style (formatting, missing semi colons, etc; no code change) | |
| refactor (refactoring production code) | |
| test (adding missing tests, refactoring tests; no production code change) | |
| chore (updating grunt tasks etc; no production code change) |
| var uniqueArray = function(arrArg) { | |
| return arrArg.filter(function(elem, pos,arr) { | |
| return arr.indexOf(elem) == pos; | |
| }); | |
| }; | |
| var uniqEs6 = (arrArg) => { | |
| return arrArg.filter((elem, pos, arr) => { | |
| return arr.indexOf(elem) == pos; | |
| }); |
| var fs = require('fs'); | |
| var Promise = require('promise'); | |
| var promises = []; | |
| var readline = require('readline'); | |
| var readFile = function (file) { | |
| return new Promise(function (resolve, reject) { | |
| var lines = []; | |
| var rl = readline.createInterface({ | |
| input: fs.createReadStream('./logs/' + file) |
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
| # Enable tab completion for JSX with Emmet in Atom | |
| *This guide assumes you have the `emmet` and `language-babel` packages already installed in Atom* | |
|  | |
| 1. Open the `keymap.cson` file by clicking on `Atom -> Keymap…` in the menu bar | |
| 2. Add these lines of code to your keymap: | |
| ```CSON | |
| 'atom-text-editor[data-grammar~="jsx"]:not([mini])': |