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
import { Store, Action } from '@ngrx/store'; | |
import { Actions, Effect } from '@ngrx/effects'; | |
import 'rxjs/add/operator/map'; | |
import 'rxjs/add/operator/filter'; | |
import 'rxjs/add/operator/withLatestFrom'; | |
import { ADD_LINE } from './lines.reducer'; | |
import { INC_PAGE_COUNT } from './pages.reducer'; | |
import { AppState } from './app.store'; |
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
import { Action } from '@ngrx/store'; | |
import { Actions, Effect } from '@ngrx/effects'; | |
import 'rxjs/add/operator/map'; | |
import { ADD_LINE } from './lines.reducer'; | |
import { INC_PAGE_COUNT } from './pages.reducer'; | |
@Injectable() |
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
import { Action, ActionReducer } from '@ngrx/store'; | |
interface Lines extends Array<string> {}; | |
export const ADD_LINE = 'ADD_LINE'; | |
export const linesReducer:ActionReducer<Lines> = (lines:Lines = [], action:Action) => { | |
switch (action.type) { | |
case ADD_LINE: |
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
%YAML1.2 | |
--- | |
# See http://www.sublimetext.com/docs/3/syntax.html | |
name: TypeScript NG | |
file_extensions: | |
- ts | |
- ng.ts | |
scope: source.ts.ng | |
contexts: | |
main: |
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
<? | |
if (!empty($_GET['q'])) { | |
$q = strtolower($_GET['q']); | |
if (strpos($q, 'what is your name') !== false) { | |
name(); | |
} elseif (strpos($q, 'nice to meet you') !== false) { | |
myName($q); | |
} elseif (strpos($q, 'what was my name') !== false) { |