├── .gitignore ├── LICENSE.txt ├── README.md ├── app ├── actions │ ├── cart-actions.ts │ ├── film-actions.ts │ ├── part-actions.ts │ └── user-actions.ts ├── app.component.ts ├── app.module.ts ├── components │ ├── admin-component.ts │ ├── films-component.ts │ └── shopping-component.ts ├── main.ts ├── reducers │ ├── app-reducer.ts │ ├── cart-reducer.ts │ ├── films-reducer.ts │ ├── part-reducer.ts │ ├── parts-reducer.ts │ └── users-reducer.ts ├── services │ ├── film.service.ts │ └── user.service.ts └── views │ ├── admin │ ├── user-view.ts │ └── users-view.ts │ ├── catalog │ ├── add-part-view.ts │ ├── cart-view.ts │ └── parts-view.ts │ └── film │ ├── film-selection-view.ts │ └── film-view.ts ├── config.js ├── gulpfile.js ├── images ├── Angular2WithRedux.gif └── Angular2WithRedux.png ├── index.html ├── package.json ├── tasks ├── dist.js └── typings.js ├── tsconfig.json └── tslint.json /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | dist 3 | jspm_packages 4 | node_modules 5 | typings 6 | typings.json 7 | 8 | npm-debug.log 9 | 10 | *.iml 11 | .idea/ 12 | .idea_modules/ 13 | 14 | app/**/*.js 15 | app/**/*.js.map 16 | 17 | test/**/*.js 18 | test/**/*.js.map 19 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 InfomediaLtd 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Angular2 Redux Example 2 | 3 | Example project for using pure Redux with Angular 2 and TypeScript. This project also uses the [angular2-redux](https://github.com/InfomediaLtd/angular2-redux) helper utility library. 4 | 5 | Demo: [http://angular2-redux-example.surge.sh](http://angular2-redux-example.surge.sh/) 6 |  7 | 8 | To set up locally, install with [jspm](http://jspm.io/): 9 | ```sh 10 | jspm install 11 | ``` 12 | 13 | Run with [live-server](https://www.npmjs.com/package/live-server): 14 | ```sh 15 | live-server 16 | ``` 17 | -------------------------------------------------------------------------------- /app/actions/cart-actions.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from "@angular/core"; 2 | import {Actions,AppStore} from "angular2-redux"; 3 | 4 | export enum CartActionTypes { 5 | ADD_TO_CART = "ADD_TO_CART" as any, 6 | REMOVE_FROM_CART = "REMOVE_FROM_CART" as any 7 | }; 8 | 9 | export interface CartAction { 10 | type:string; 11 | id?:string; 12 | } 13 | 14 | @Injectable() 15 | export class CartActions extends Actions { 16 | 17 | constructor(appStore:AppStore) { 18 | super(appStore); 19 | } 20 | 21 | addToCart(id) { 22 | return {type: CartActionTypes.ADD_TO_CART, id}; 23 | }; 24 | 25 | removeFromCart(id) { 26 | return {type: CartActionTypes.REMOVE_FROM_CART, id}; 27 | }; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /app/actions/film-actions.ts: -------------------------------------------------------------------------------- 1 | import {Http} from "@angular/http"; 2 | import {Injectable} from "@angular/core"; 3 | import {Actions,AppStore} from "angular2-redux"; 4 | import {FilmService} from "../services/film.service"; 5 | import 'rxjs/add/operator/map'; 6 | 7 | export enum FilmActionTypes { 8 | REQUEST_FILMS = "REQUEST_FILMS" as any, 9 | RECEIVE_FILMS = "RECEIVE_FILMS" as any, 10 | REQUEST_FILM = "REQUEST_FILM" as any, 11 | RECEIVE_FILM = "RECEIVE_FILM" as any, 12 | RECEIVE_NUMBER_OF_FILMS = "RECEIVE_NUMBER_OF_FILMS" as any, 13 | CURRENT_FILM = "CURRENT_FILM" as any 14 | }; 15 | 16 | export interface FilmAction { 17 | type:string; 18 | count?; 19 | films?; 20 | film?; 21 | currentIndex?; 22 | } 23 | 24 | @Injectable() 25 | export class FilmActions extends Actions { 26 | 27 | constructor(private filmService:FilmService, appStore:AppStore) { 28 | super(appStore); 29 | } 30 | 31 | fetchFilms() { 32 | return (dispatch) => { 33 | dispatch(this.requestFilms()); 34 | 35 | this.filmService.get() 36 | .map(json => { 37 | dispatch(this.receiveFilms(json.results)); 38 | dispatch(this.receiveNumberOfFilms(json.count)); 39 | }) 40 | .subscribe(); 41 | }; 42 | } 43 | 44 | fetchFilm(index) { 45 | return (dispatch) => { 46 | dispatch(this.requestFilm()); 47 | 48 | this._http.get(`${BASE_URL}${index + 1}/`) 49 | .map(result => result.json()) 50 | .map(json => { 51 | dispatch(this.receiveFilm(json)); 52 | }) 53 | .subscribe(); 54 | }; 55 | } 56 | 57 | requestFilms() { 58 | return {type: FilmActionTypes.REQUEST_FILMS}; 59 | } 60 | 61 | receiveFilms(films) { 62 | return { 63 | type: FilmActionTypes.RECEIVE_FILMS, 64 | films 65 | } 66 | } 67 | 68 | receiveNumberOfFilms(count) { 69 | return { 70 | type: FilmActionTypes.RECEIVE_NUMBER_OF_FILMS, 71 | count 72 | } 73 | } 74 | 75 | requestFilm() { 76 | return {type: FilmActionTypes.REQUEST_FILM}; 77 | } 78 | 79 | receiveFilm(film) { 80 | return { 81 | type: FilmActionTypes.RECEIVE_FILM, 82 | film 83 | } 84 | } 85 | 86 | setCurrentFilm(currentIndex) { 87 | return { 88 | type: FilmActionTypes.CURRENT_FILM, 89 | currentIndex 90 | } 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /app/actions/part-actions.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from "@angular/core"; 2 | import {Actions,AppStore} from "angular2-redux"; 3 | 4 | export const ADD_PART = 'ADD_PART'; 5 | 6 | export enum PartActionTypes { 7 | ADD_PART = "ADD_PART" as any 8 | }; 9 | 10 | export interface PartAction { 11 | type:String; 12 | id?:number; 13 | name?:string; 14 | } 15 | 16 | @Injectable() 17 | export class PartActions extends Actions { 18 | private id:number = 11; 19 | 20 | constructor(appStore:AppStore) { 21 | super(appStore); 22 | } 23 | 24 | addPart(name) { 25 | return {type: PartActionTypes.ADD_PART, id: ++this.id, name}; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/actions/user-actions.ts: -------------------------------------------------------------------------------- 1 | import {Http} from "@angular/http"; 2 | import {Injectable} from "@angular/core"; 3 | import {Actions,AppStore} from "angular2-redux"; 4 | import {UserService} from "../services/user.service"; 5 | import 'rxjs/add/operator/map'; 6 | 7 | export enum UserActionTypes { 8 | REQUEST_USERS = "REQUEST_USERS" as any, 9 | RECEIVE_USERS = "RECEIVE_USERS" as any, 10 | CURRENT_USER = "CURRENT_USER" as any, 11 | SET_FILM_FILTER = "SET_FILM_FILTER" as any 12 | }; 13 | 14 | export interface UserAction { 15 | type:string; 16 | users?; 17 | updated?:Date; 18 | current?; 19 | filmFilter?:string; 20 | } 21 | 22 | @Injectable() 23 | export class UserActions extends Actions { 24 | 25 | constructor(private userService:UserService, appStore:AppStore) { 26 | super(appStore); 27 | } 28 | 29 | fetchUsers() { 30 | return (dispatch) => { 31 | dispatch(this.requestUsers()); 32 | this.userService.get() 33 | .map(result => dispatch(this.receiveUsers(result))) 34 | .subscribe(); 35 | }; 36 | } 37 | 38 | requestUsers() { 39 | return {type: UserActionTypes.REQUEST_USERS}; 40 | } 41 | 42 | receiveUsers(users) { 43 | return { 44 | type: UserActionTypes.RECEIVE_USERS, 45 | users, 46 | updated: Date.now() 47 | } 48 | } 49 | 50 | setCurrentUser(current) { 51 | return { 52 | type: UserActionTypes.CURRENT_USER, 53 | current 54 | } 55 | } 56 | 57 | setFilmFilter(filmFilter) { 58 | return { 59 | type: UserActionTypes.SET_FILM_FILTER, 60 | filmFilter: filmFilter 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /app/app.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core' 2 | import {AppStore} from "angular2-redux"; 3 | 4 | @Component({ 5 | selector: 'my-app', 6 | template: ` 7 |
0" class="text-muted">Empty :(
7 |10 | 13 | | 14 |{{part.name}} | 15 |
14 | 18 | | 19 |{{part.name}} | 20 |
{{data?.opening_crawl}}
8 | `, 9 | styles: [` 10 | .blink { 11 | margin-left:10px; 12 | animation: blink .75s linear infinite; 13 | } 14 | @keyframes blink { 15 | 0% { opacity: 1; } 16 | 50% { opacity: 1; } 17 | 50.01% { opacity: 0; } 18 | 100% { opacity: 0; } 19 | } 20 | `], 21 | changeDetection:ChangeDetectionStrategy.OnPush 22 | }) 23 | export class FilmView { 24 | 25 | @Input() data = null; 26 | @Input() loading = false; 27 | 28 | } -------------------------------------------------------------------------------- /config.js: -------------------------------------------------------------------------------- 1 | System.config({ 2 | baseURL: "/", 3 | defaultJSExtensions: true, 4 | transpiler: "typescript", 5 | typescriptOptions: { 6 | "module": "commonjs", 7 | "emitDecoratorMetadata": true 8 | }, 9 | paths: { 10 | "npm:*": "jspm_packages/npm/*", 11 | "github:*": "jspm_packages/github/*" 12 | }, 13 | 14 | packages: { 15 | "app": { 16 | "main": "main", 17 | "defaultExtension": "ts" 18 | }, 19 | "angular2-simple-list": { 20 | "main": "src/index.ts", 21 | "defaultExtension": "ts" 22 | } 23 | }, 24 | 25 | map: { 26 | "@angular/common": "npm:@angular/common@2.3.0", 27 | "@angular/compiler": "npm:@angular/compiler@2.3.0", 28 | "@angular/core": "npm:@angular/core@2.3.0", 29 | "@angular/forms": "npm:@angular/forms@2.3.0", 30 | "@angular/http": "npm:@angular/http@2.3.0", 31 | "@angular/material": "npm:@angular/material@2.0.0-alpha.9-experimental-pizza", 32 | "@angular/platform-browser": "npm:@angular/platform-browser@2.3.0", 33 | "@angular/platform-browser-dynamic": "npm:@angular/platform-browser-dynamic@2.3.0", 34 | "@angular/router": "npm:@angular/router@3.3.0", 35 | "@angular/router-deprecated": "npm:@angular/router-deprecated@2.0.0-rc.1", 36 | "angular2-redux": "npm:angular2-redux@4.0.0", 37 | "angular2-simple-list": "github:InfomediaLtd/angular2-simple-list@master", 38 | "bootstrap": "github:twbs/bootstrap@3.3.7", 39 | "clean-css": "npm:clean-css@3.4.21", 40 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 41 | "css": "github:systemjs/plugin-css@0.1.32", 42 | "redux": "npm:redux@3.6.0", 43 | "redux-thunk": "npm:redux-thunk@1.0.3", 44 | "reflect-metadata": "npm:reflect-metadata@0.1.8", 45 | "reselect": "npm:reselect@2.5.4", 46 | "rxjs": "npm:rxjs@5.0.0-rc.4", 47 | "ts": "github:frankwallis/plugin-typescript@2.6.0", 48 | "typescript": "npm:typescript@2.1.4", 49 | "zone.js": "npm:zone.js@0.6.26", 50 | "github:InfomediaLtd/angular2-simple-list@master": { 51 | "@angular/common": "npm:@angular/common@2.3.0", 52 | "@angular/compiler": "npm:@angular/compiler@2.3.0", 53 | "@angular/core": "npm:@angular/core@2.3.0", 54 | "@angular/forms": "npm:@angular/forms@2.3.0", 55 | "@angular/http": "npm:@angular/http@2.3.0", 56 | "@angular/material": "npm:@angular/material@2.0.0-alpha.9-experimental-pizza", 57 | "@angular/platform-browser": "npm:@angular/platform-browser@2.3.0", 58 | "@angular/platform-browser-dynamic": "npm:@angular/platform-browser-dynamic@2.3.0", 59 | "@angular/router": "npm:@angular/router@3.3.0", 60 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 61 | "css": "github:systemjs/plugin-css@0.1.32", 62 | "reflect-metadata": "npm:reflect-metadata@0.1.8", 63 | "rxjs": "npm:rxjs@5.0.0-rc.4", 64 | "text": "github:systemjs/plugin-text@0.0.9", 65 | "zone.js": "npm:zone.js@0.6.26" 66 | }, 67 | "github:frankwallis/plugin-typescript@2.6.0": { 68 | "typescript": "npm:typescript@1.7.5" 69 | }, 70 | "github:jspm/nodelibs-assert@0.1.0": { 71 | "assert": "npm:assert@1.4.1" 72 | }, 73 | "github:jspm/nodelibs-buffer@0.1.0": { 74 | "buffer": "npm:buffer@3.6.0" 75 | }, 76 | "github:jspm/nodelibs-constants@0.1.0": { 77 | "constants-browserify": "npm:constants-browserify@0.0.1" 78 | }, 79 | "github:jspm/nodelibs-crypto@0.1.0": { 80 | "crypto-browserify": "npm:crypto-browserify@3.11.0" 81 | }, 82 | "github:jspm/nodelibs-events@0.1.1": { 83 | "events": "npm:events@1.0.2" 84 | }, 85 | "github:jspm/nodelibs-http@1.7.1": { 86 | "Base64": "npm:Base64@0.2.1", 87 | "events": "github:jspm/nodelibs-events@0.1.1", 88 | "inherits": "npm:inherits@2.0.1", 89 | "stream": "github:jspm/nodelibs-stream@0.1.0", 90 | "url": "github:jspm/nodelibs-url@0.1.0", 91 | "util": "github:jspm/nodelibs-util@0.1.0" 92 | }, 93 | "github:jspm/nodelibs-https@0.1.0": { 94 | "https-browserify": "npm:https-browserify@0.0.0" 95 | }, 96 | "github:jspm/nodelibs-net@0.1.2": { 97 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 98 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 99 | "http": "github:jspm/nodelibs-http@1.7.1", 100 | "net": "github:jspm/nodelibs-net@0.1.2", 101 | "process": "github:jspm/nodelibs-process@0.1.2", 102 | "stream": "github:jspm/nodelibs-stream@0.1.0", 103 | "timers": "github:jspm/nodelibs-timers@0.1.0", 104 | "util": "github:jspm/nodelibs-util@0.1.0" 105 | }, 106 | "github:jspm/nodelibs-os@0.1.0": { 107 | "os-browserify": "npm:os-browserify@0.1.2" 108 | }, 109 | "github:jspm/nodelibs-path@0.1.0": { 110 | "path-browserify": "npm:path-browserify@0.0.0" 111 | }, 112 | "github:jspm/nodelibs-process@0.1.2": { 113 | "process": "npm:process@0.11.9" 114 | }, 115 | "github:jspm/nodelibs-querystring@0.1.0": { 116 | "querystring": "npm:querystring@0.2.0" 117 | }, 118 | "github:jspm/nodelibs-stream@0.1.0": { 119 | "stream-browserify": "npm:stream-browserify@1.0.0" 120 | }, 121 | "github:jspm/nodelibs-string_decoder@0.1.0": { 122 | "string_decoder": "npm:string_decoder@0.10.31" 123 | }, 124 | "github:jspm/nodelibs-timers@0.1.0": { 125 | "timers-browserify": "npm:timers-browserify@1.4.2" 126 | }, 127 | "github:jspm/nodelibs-url@0.1.0": { 128 | "url": "npm:url@0.10.3" 129 | }, 130 | "github:jspm/nodelibs-util@0.1.0": { 131 | "util": "npm:util@0.10.3" 132 | }, 133 | "github:jspm/nodelibs-vm@0.1.0": { 134 | "vm-browserify": "npm:vm-browserify@0.0.4" 135 | }, 136 | "github:twbs/bootstrap@3.3.7": { 137 | "jquery": "npm:jquery@3.1.1" 138 | }, 139 | "npm:@angular/common@2.0.0-rc.1": { 140 | "@angular/core": "npm:@angular/core@2.0.0-rc.1", 141 | "process": "github:jspm/nodelibs-process@0.1.2" 142 | }, 143 | "npm:@angular/common@2.3.0": { 144 | "@angular/core": "npm:@angular/core@2.3.0" 145 | }, 146 | "npm:@angular/compiler@2.0.0-rc.1": { 147 | "@angular/core": "npm:@angular/core@2.0.0-rc.1", 148 | "process": "github:jspm/nodelibs-process@0.1.2" 149 | }, 150 | "npm:@angular/compiler@2.3.0": { 151 | "@angular/core": "npm:@angular/core@2.3.0", 152 | "process": "github:jspm/nodelibs-process@0.1.2" 153 | }, 154 | "npm:@angular/core@2.0.0-rc.1": { 155 | "process": "github:jspm/nodelibs-process@0.1.2", 156 | "rxjs": "npm:rxjs@5.0.0-beta.6", 157 | "zone.js": "npm:zone.js@0.6.26" 158 | }, 159 | "npm:@angular/core@2.3.0": { 160 | "process": "github:jspm/nodelibs-process@0.1.2", 161 | "rxjs": "npm:rxjs@5.0.0-rc.4", 162 | "zone.js": "npm:zone.js@0.7.2" 163 | }, 164 | "npm:@angular/forms@2.3.0": { 165 | "@angular/common": "npm:@angular/common@2.3.0", 166 | "@angular/core": "npm:@angular/core@2.3.0", 167 | "process": "github:jspm/nodelibs-process@0.1.2" 168 | }, 169 | "npm:@angular/http@2.3.0": { 170 | "@angular/core": "npm:@angular/core@2.3.0", 171 | "@angular/platform-browser": "npm:@angular/platform-browser@2.3.0", 172 | "rxjs": "npm:rxjs@5.0.0-rc.4" 173 | }, 174 | "npm:@angular/material@2.0.0-alpha.9-experimental-pizza": { 175 | "@angular/common": "npm:@angular/common@2.3.0", 176 | "@angular/core": "npm:@angular/core@2.3.0", 177 | "@types/hammerjs": "npm:@types/hammerjs@2.0.33", 178 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 179 | "process": "github:jspm/nodelibs-process@0.1.2" 180 | }, 181 | "npm:@angular/platform-browser-dynamic@2.3.0": { 182 | "@angular/common": "npm:@angular/common@2.3.0", 183 | "@angular/compiler": "npm:@angular/compiler@2.3.0", 184 | "@angular/core": "npm:@angular/core@2.3.0", 185 | "@angular/platform-browser": "npm:@angular/platform-browser@2.3.0" 186 | }, 187 | "npm:@angular/platform-browser@2.0.0-rc.1": { 188 | "@angular/common": "npm:@angular/common@2.0.0-rc.1", 189 | "@angular/compiler": "npm:@angular/compiler@2.0.0-rc.1", 190 | "@angular/core": "npm:@angular/core@2.0.0-rc.1", 191 | "process": "github:jspm/nodelibs-process@0.1.2" 192 | }, 193 | "npm:@angular/platform-browser@2.3.0": { 194 | "@angular/common": "npm:@angular/common@2.3.0", 195 | "@angular/core": "npm:@angular/core@2.3.0", 196 | "process": "github:jspm/nodelibs-process@0.1.2" 197 | }, 198 | "npm:@angular/router-deprecated@2.0.0-rc.1": { 199 | "@angular/common": "npm:@angular/common@2.0.0-rc.1", 200 | "@angular/core": "npm:@angular/core@2.0.0-rc.1", 201 | "@angular/platform-browser": "npm:@angular/platform-browser@2.0.0-rc.1" 202 | }, 203 | "npm:@angular/router@3.3.0": { 204 | "@angular/common": "npm:@angular/common@2.3.0", 205 | "@angular/core": "npm:@angular/core@2.3.0", 206 | "@angular/platform-browser": "npm:@angular/platform-browser@2.3.0", 207 | "process": "github:jspm/nodelibs-process@0.1.2", 208 | "rxjs": "npm:rxjs@5.0.0-rc.4" 209 | }, 210 | "npm:amdefine@1.0.1": { 211 | "fs": "github:jspm/nodelibs-fs@0.1.2", 212 | "module": "github:jspm/nodelibs-module@0.1.0", 213 | "path": "github:jspm/nodelibs-path@0.1.0", 214 | "process": "github:jspm/nodelibs-process@0.1.2" 215 | }, 216 | "npm:angular2-redux@4.0.0": { 217 | "redux": "npm:redux@3.6.0", 218 | "redux-thunk": "npm:redux-thunk@2.1.0", 219 | "rxjs": "npm:rxjs@5.0.0-beta.12" 220 | }, 221 | "npm:asn1.js@4.9.0": { 222 | "bn.js": "npm:bn.js@4.11.6", 223 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 224 | "inherits": "npm:inherits@2.0.1", 225 | "minimalistic-assert": "npm:minimalistic-assert@1.0.0", 226 | "vm": "github:jspm/nodelibs-vm@0.1.0" 227 | }, 228 | "npm:assert@1.4.1": { 229 | "assert": "github:jspm/nodelibs-assert@0.1.0", 230 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 231 | "process": "github:jspm/nodelibs-process@0.1.2", 232 | "util": "npm:util@0.10.3" 233 | }, 234 | "npm:bn.js@4.11.6": { 235 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 236 | "systemjs-json": "github:systemjs/plugin-json@0.1.2" 237 | }, 238 | "npm:browserify-aes@1.0.6": { 239 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 240 | "buffer-xor": "npm:buffer-xor@1.0.3", 241 | "cipher-base": "npm:cipher-base@1.0.3", 242 | "create-hash": "npm:create-hash@1.1.2", 243 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 244 | "evp_bytestokey": "npm:evp_bytestokey@1.0.0", 245 | "fs": "github:jspm/nodelibs-fs@0.1.2", 246 | "inherits": "npm:inherits@2.0.1", 247 | "systemjs-json": "github:systemjs/plugin-json@0.1.2" 248 | }, 249 | "npm:browserify-cipher@1.0.0": { 250 | "browserify-aes": "npm:browserify-aes@1.0.6", 251 | "browserify-des": "npm:browserify-des@1.0.0", 252 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 253 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 254 | "evp_bytestokey": "npm:evp_bytestokey@1.0.0" 255 | }, 256 | "npm:browserify-des@1.0.0": { 257 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 258 | "cipher-base": "npm:cipher-base@1.0.3", 259 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 260 | "des.js": "npm:des.js@1.0.0", 261 | "inherits": "npm:inherits@2.0.1", 262 | "systemjs-json": "github:systemjs/plugin-json@0.1.2" 263 | }, 264 | "npm:browserify-rsa@4.0.1": { 265 | "bn.js": "npm:bn.js@4.11.6", 266 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 267 | "constants": "github:jspm/nodelibs-constants@0.1.0", 268 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 269 | "randombytes": "npm:randombytes@2.0.3", 270 | "systemjs-json": "github:systemjs/plugin-json@0.1.2" 271 | }, 272 | "npm:browserify-sign@4.0.0": { 273 | "bn.js": "npm:bn.js@4.11.6", 274 | "browserify-rsa": "npm:browserify-rsa@4.0.1", 275 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 276 | "create-hash": "npm:create-hash@1.1.2", 277 | "create-hmac": "npm:create-hmac@1.1.4", 278 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 279 | "elliptic": "npm:elliptic@6.3.2", 280 | "inherits": "npm:inherits@2.0.1", 281 | "parse-asn1": "npm:parse-asn1@5.0.0", 282 | "stream": "github:jspm/nodelibs-stream@0.1.0" 283 | }, 284 | "npm:buffer-xor@1.0.3": { 285 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 286 | "systemjs-json": "github:systemjs/plugin-json@0.1.2" 287 | }, 288 | "npm:buffer@3.6.0": { 289 | "base64-js": "npm:base64-js@0.0.8", 290 | "child_process": "github:jspm/nodelibs-child_process@0.1.0", 291 | "fs": "github:jspm/nodelibs-fs@0.1.2", 292 | "ieee754": "npm:ieee754@1.1.8", 293 | "isarray": "npm:isarray@1.0.0", 294 | "process": "github:jspm/nodelibs-process@0.1.2" 295 | }, 296 | "npm:cipher-base@1.0.3": { 297 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 298 | "inherits": "npm:inherits@2.0.1", 299 | "stream": "github:jspm/nodelibs-stream@0.1.0", 300 | "string_decoder": "github:jspm/nodelibs-string_decoder@0.1.0", 301 | "systemjs-json": "github:systemjs/plugin-json@0.1.2" 302 | }, 303 | "npm:clean-css@3.4.21": { 304 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 305 | "commander": "npm:commander@2.8.1", 306 | "fs": "github:jspm/nodelibs-fs@0.1.2", 307 | "http": "github:jspm/nodelibs-http@1.7.1", 308 | "https": "github:jspm/nodelibs-https@0.1.0", 309 | "os": "github:jspm/nodelibs-os@0.1.0", 310 | "path": "github:jspm/nodelibs-path@0.1.0", 311 | "process": "github:jspm/nodelibs-process@0.1.2", 312 | "source-map": "npm:source-map@0.4.4", 313 | "url": "github:jspm/nodelibs-url@0.1.0", 314 | "util": "github:jspm/nodelibs-util@0.1.0" 315 | }, 316 | "npm:commander@2.8.1": { 317 | "child_process": "github:jspm/nodelibs-child_process@0.1.0", 318 | "events": "github:jspm/nodelibs-events@0.1.1", 319 | "fs": "github:jspm/nodelibs-fs@0.1.2", 320 | "graceful-readlink": "npm:graceful-readlink@1.0.1", 321 | "path": "github:jspm/nodelibs-path@0.1.0", 322 | "process": "github:jspm/nodelibs-process@0.1.2" 323 | }, 324 | "npm:constants-browserify@0.0.1": { 325 | "systemjs-json": "github:systemjs/plugin-json@0.1.2" 326 | }, 327 | "npm:core-util-is@1.0.2": { 328 | "buffer": "github:jspm/nodelibs-buffer@0.1.0" 329 | }, 330 | "npm:create-ecdh@4.0.0": { 331 | "bn.js": "npm:bn.js@4.11.6", 332 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 333 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 334 | "elliptic": "npm:elliptic@6.3.2" 335 | }, 336 | "npm:create-hash@1.1.2": { 337 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 338 | "cipher-base": "npm:cipher-base@1.0.3", 339 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 340 | "fs": "github:jspm/nodelibs-fs@0.1.2", 341 | "inherits": "npm:inherits@2.0.1", 342 | "ripemd160": "npm:ripemd160@1.0.1", 343 | "sha.js": "npm:sha.js@2.4.8" 344 | }, 345 | "npm:create-hmac@1.1.4": { 346 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 347 | "create-hash": "npm:create-hash@1.1.2", 348 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 349 | "inherits": "npm:inherits@2.0.1", 350 | "stream": "github:jspm/nodelibs-stream@0.1.0" 351 | }, 352 | "npm:crypto-browserify@3.11.0": { 353 | "browserify-cipher": "npm:browserify-cipher@1.0.0", 354 | "browserify-sign": "npm:browserify-sign@4.0.0", 355 | "create-ecdh": "npm:create-ecdh@4.0.0", 356 | "create-hash": "npm:create-hash@1.1.2", 357 | "create-hmac": "npm:create-hmac@1.1.4", 358 | "diffie-hellman": "npm:diffie-hellman@5.0.2", 359 | "inherits": "npm:inherits@2.0.1", 360 | "pbkdf2": "npm:pbkdf2@3.0.9", 361 | "public-encrypt": "npm:public-encrypt@4.0.0", 362 | "randombytes": "npm:randombytes@2.0.3", 363 | "systemjs-json": "github:systemjs/plugin-json@0.1.2" 364 | }, 365 | "npm:des.js@1.0.0": { 366 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 367 | "inherits": "npm:inherits@2.0.1", 368 | "minimalistic-assert": "npm:minimalistic-assert@1.0.0" 369 | }, 370 | "npm:diffie-hellman@5.0.2": { 371 | "bn.js": "npm:bn.js@4.11.6", 372 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 373 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 374 | "miller-rabin": "npm:miller-rabin@4.0.0", 375 | "randombytes": "npm:randombytes@2.0.3", 376 | "systemjs-json": "github:systemjs/plugin-json@0.1.2" 377 | }, 378 | "npm:elliptic@6.3.2": { 379 | "bn.js": "npm:bn.js@4.11.6", 380 | "brorand": "npm:brorand@1.0.6", 381 | "hash.js": "npm:hash.js@1.0.3", 382 | "inherits": "npm:inherits@2.0.1", 383 | "systemjs-json": "github:systemjs/plugin-json@0.1.2" 384 | }, 385 | "npm:evp_bytestokey@1.0.0": { 386 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 387 | "create-hash": "npm:create-hash@1.1.2", 388 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 389 | "systemjs-json": "github:systemjs/plugin-json@0.1.2" 390 | }, 391 | "npm:graceful-readlink@1.0.1": { 392 | "fs": "github:jspm/nodelibs-fs@0.1.2" 393 | }, 394 | "npm:hash.js@1.0.3": { 395 | "inherits": "npm:inherits@2.0.1" 396 | }, 397 | "npm:https-browserify@0.0.0": { 398 | "http": "github:jspm/nodelibs-http@1.7.1" 399 | }, 400 | "npm:inherits@2.0.1": { 401 | "util": "github:jspm/nodelibs-util@0.1.0" 402 | }, 403 | "npm:isarray@1.0.0": { 404 | "systemjs-json": "github:systemjs/plugin-json@0.1.2" 405 | }, 406 | "npm:loose-envify@1.3.0": { 407 | "fs": "github:jspm/nodelibs-fs@0.1.2", 408 | "js-tokens": "npm:js-tokens@2.0.0", 409 | "process": "github:jspm/nodelibs-process@0.1.2", 410 | "stream": "github:jspm/nodelibs-stream@0.1.0", 411 | "util": "github:jspm/nodelibs-util@0.1.0" 412 | }, 413 | "npm:miller-rabin@4.0.0": { 414 | "bn.js": "npm:bn.js@4.11.6", 415 | "brorand": "npm:brorand@1.0.6" 416 | }, 417 | "npm:os-browserify@0.1.2": { 418 | "os": "github:jspm/nodelibs-os@0.1.0" 419 | }, 420 | "npm:parse-asn1@5.0.0": { 421 | "asn1.js": "npm:asn1.js@4.9.0", 422 | "browserify-aes": "npm:browserify-aes@1.0.6", 423 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 424 | "create-hash": "npm:create-hash@1.1.2", 425 | "evp_bytestokey": "npm:evp_bytestokey@1.0.0", 426 | "pbkdf2": "npm:pbkdf2@3.0.9", 427 | "systemjs-json": "github:systemjs/plugin-json@0.1.2" 428 | }, 429 | "npm:path-browserify@0.0.0": { 430 | "process": "github:jspm/nodelibs-process@0.1.2" 431 | }, 432 | "npm:pbkdf2@3.0.9": { 433 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 434 | "create-hmac": "npm:create-hmac@1.1.4", 435 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 436 | "process": "github:jspm/nodelibs-process@0.1.2" 437 | }, 438 | "npm:process@0.11.9": { 439 | "assert": "github:jspm/nodelibs-assert@0.1.0", 440 | "fs": "github:jspm/nodelibs-fs@0.1.2", 441 | "vm": "github:jspm/nodelibs-vm@0.1.0" 442 | }, 443 | "npm:public-encrypt@4.0.0": { 444 | "bn.js": "npm:bn.js@4.11.6", 445 | "browserify-rsa": "npm:browserify-rsa@4.0.1", 446 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 447 | "create-hash": "npm:create-hash@1.1.2", 448 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 449 | "parse-asn1": "npm:parse-asn1@5.0.0", 450 | "randombytes": "npm:randombytes@2.0.3" 451 | }, 452 | "npm:punycode@1.3.2": { 453 | "process": "github:jspm/nodelibs-process@0.1.2" 454 | }, 455 | "npm:randombytes@2.0.3": { 456 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 457 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 458 | "process": "github:jspm/nodelibs-process@0.1.2", 459 | "systemjs-json": "github:systemjs/plugin-json@0.1.2" 460 | }, 461 | "npm:readable-stream@1.1.14": { 462 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 463 | "core-util-is": "npm:core-util-is@1.0.2", 464 | "events": "github:jspm/nodelibs-events@0.1.1", 465 | "inherits": "npm:inherits@2.0.1", 466 | "isarray": "npm:isarray@0.0.1", 467 | "process": "github:jspm/nodelibs-process@0.1.2", 468 | "stream-browserify": "npm:stream-browserify@1.0.0", 469 | "string_decoder": "npm:string_decoder@0.10.31" 470 | }, 471 | "npm:redux@3.6.0": { 472 | "lodash": "npm:lodash@4.17.2", 473 | "lodash-es": "npm:lodash-es@4.17.2", 474 | "loose-envify": "npm:loose-envify@1.3.0", 475 | "process": "github:jspm/nodelibs-process@0.1.2", 476 | "symbol-observable": "npm:symbol-observable@1.0.4" 477 | }, 478 | "npm:ripemd160@1.0.1": { 479 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 480 | "process": "github:jspm/nodelibs-process@0.1.2" 481 | }, 482 | "npm:rxjs@5.0.0-beta.12": { 483 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 484 | "process": "github:jspm/nodelibs-process@0.1.2", 485 | "symbol-observable": "npm:symbol-observable@1.0.4" 486 | }, 487 | "npm:rxjs@5.0.0-beta.6": { 488 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 489 | "process": "github:jspm/nodelibs-process@0.1.2" 490 | }, 491 | "npm:rxjs@5.0.0-rc.4": { 492 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 493 | "process": "github:jspm/nodelibs-process@0.1.2", 494 | "symbol-observable": "npm:symbol-observable@1.0.4" 495 | }, 496 | "npm:sha.js@2.4.8": { 497 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 498 | "fs": "github:jspm/nodelibs-fs@0.1.2", 499 | "inherits": "npm:inherits@2.0.1", 500 | "process": "github:jspm/nodelibs-process@0.1.2" 501 | }, 502 | "npm:source-map-support@0.4.6": { 503 | "assert": "github:jspm/nodelibs-assert@0.1.0", 504 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 505 | "child_process": "github:jspm/nodelibs-child_process@0.1.0", 506 | "fs": "github:jspm/nodelibs-fs@0.1.2", 507 | "module": "github:jspm/nodelibs-module@0.1.0", 508 | "path": "github:jspm/nodelibs-path@0.1.0", 509 | "process": "github:jspm/nodelibs-process@0.1.2", 510 | "querystring": "github:jspm/nodelibs-querystring@0.1.0", 511 | "source-map": "npm:source-map@0.5.6" 512 | }, 513 | "npm:source-map@0.4.4": { 514 | "amdefine": "npm:amdefine@1.0.1", 515 | "process": "github:jspm/nodelibs-process@0.1.2" 516 | }, 517 | "npm:source-map@0.5.6": { 518 | "process": "github:jspm/nodelibs-process@0.1.2" 519 | }, 520 | "npm:stream-browserify@1.0.0": { 521 | "events": "github:jspm/nodelibs-events@0.1.1", 522 | "inherits": "npm:inherits@2.0.1", 523 | "readable-stream": "npm:readable-stream@1.1.14" 524 | }, 525 | "npm:string_decoder@0.10.31": { 526 | "buffer": "github:jspm/nodelibs-buffer@0.1.0" 527 | }, 528 | "npm:timers-browserify@1.4.2": { 529 | "process": "npm:process@0.11.9" 530 | }, 531 | "npm:typescript@2.1.4": { 532 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 533 | "net": "github:jspm/nodelibs-net@0.1.2", 534 | "os": "github:jspm/nodelibs-os@0.1.0", 535 | "source-map-support": "npm:source-map-support@0.4.6" 536 | }, 537 | "npm:url@0.10.3": { 538 | "assert": "github:jspm/nodelibs-assert@0.1.0", 539 | "punycode": "npm:punycode@1.3.2", 540 | "querystring": "npm:querystring@0.2.0", 541 | "util": "github:jspm/nodelibs-util@0.1.0" 542 | }, 543 | "npm:util@0.10.3": { 544 | "inherits": "npm:inherits@2.0.1", 545 | "process": "github:jspm/nodelibs-process@0.1.2" 546 | }, 547 | "npm:vm-browserify@0.0.4": { 548 | "indexof": "npm:indexof@0.0.1" 549 | }, 550 | "npm:zone.js@0.6.26": { 551 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 552 | "events": "github:jspm/nodelibs-events@0.1.1", 553 | "fs": "github:jspm/nodelibs-fs@0.1.2", 554 | "process": "github:jspm/nodelibs-process@0.1.2", 555 | "timers": "github:jspm/nodelibs-timers@0.1.0" 556 | }, 557 | "npm:zone.js@0.7.2": { 558 | "crypto": "github:jspm/nodelibs-crypto@0.1.0", 559 | "events": "github:jspm/nodelibs-events@0.1.1", 560 | "fs": "github:jspm/nodelibs-fs@0.1.2", 561 | "process": "github:jspm/nodelibs-process@0.1.2", 562 | "timers": "github:jspm/nodelibs-timers@0.1.0" 563 | } 564 | } 565 | }); 566 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var requireDir = require("require-dir"); 2 | requireDir("./tasks", { recurse: true }); 3 | -------------------------------------------------------------------------------- /images/Angular2WithRedux.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfomediaLtd/angular2-redux-example/a655c6c3cab7170165440a2b622280cae2a72b53/images/Angular2WithRedux.gif -------------------------------------------------------------------------------- /images/Angular2WithRedux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfomediaLtd/angular2-redux-example/a655c6c3cab7170165440a2b622280cae2a72b53/images/Angular2WithRedux.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |