$ npm install --save babel-cli babel-preset-es2015
$ npm install --save-dev jasmine
.babelrc:
{
"presets": ["es2015"]
$ npm install --save babel-cli babel-preset-es2015
$ npm install --save-dev jasmine
.babelrc:
{
"presets": ["es2015"]
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!
Table of Contents
SELECT ddlsql || regexp_replace(name, E'^_',E'','g') As ddlsql FROM (SELECT 'ALTER TABLE ' || quote_ident(t.table_schema) || '.' | |
|| quote_ident(t.table_name) || ' RENAME TO ' As ddlsql, quote_ident(lower(regexp_replace(t.table_name, E'([A-Z])', E'\_\\1','g'))) || ';' as name | |
FROM information_schema.tables As t | |
WHERE t.table_schema NOT IN('information_schema', 'pg_catalog') | |
AND t.table_name <> lower(t.table_name) | |
ORDER BY t.table_schema, t.table_name) x; |
SELECT ddlsql || regexp_replace(name, E'^_',E'','g') || ';' as ddlsql FROM | |
( | |
SELECT 'ALTER TABLE ' || quote_ident(c.table_schema) || '.' | |
|| quote_ident(c.table_name) || ' RENAME "' || c.column_name || '" TO ' As ddlsql, quote_ident(lower(regexp_replace(column_name, E'([A-Z])', E'\_\\1','g'))) as name | |
FROM information_schema.columns As c | |
WHERE c.table_schema NOT IN('information_schema', 'pg_catalog') | |
AND c.column_name <> lower(c.column_name) | |
ORDER BY c.table_schema, c.table_name, c.column_name | |
) x; |
import { Subject } from 'rxjs/Subject'; | |
import { Store } from '@ngrx/store'; | |
import { Component, OnInit, OnDestroy, AfterViewInit } from '@angular/core'; | |
import { AppState } from '../../../root.reducer'; | |
@Component({ | |
selector: 'my-map-example', | |
template: ` | |
<sebm-google-map |
Microsyntax in Angular allows you to write <div *ngFor="let item of items">{{item}}</div>
instead of <ng-template ngFor [ngForOf]="items"><div>{{item}}</div></ng-template
.
The microsyntax must:
Make sure you've read the Angular.io CONTRIBUTING.md before starting out.
Follow these steps when you are setting up the repo locally for the first time and would like to view your changes in the browser as you edit.
In terminal:
any
: magic, ill-behaved type that acts like a combination of never
(the proper [bottom type]) and unknown
(the proper [top type])
never
is assignable to any
, and any
is assignable to anything at all.any & AnyTypeExpression = any
, any | AnyTypeExpression = any
unknown
: proper, well-behaved [top type]
unknown
. unknown
is only assignable to itself (unknown
) and any
.unknown & AnyTypeExpression = AnyTypeExpression
, unknown | AnyTypeExpression = unknown
any
whenever possible. Anywhere in well-typed code you're tempted to use any
, you probably want unknown
.