Skip to content

Commit 52dc61a

Browse files
committed
chore: update angular to 2.0.0-alpha.46
- npm: update dependencies - AuthService, TaskStore: EventEmitter is now generic and requires a type [angular/angular#4893] - AuthService, TaskStore: EventEmitter and Observable now use the .subscribe(generatorOrNext, error, complete) method instead of .observer(generator) [angular/angular/pull/4893] - tsconfig: set `moduleResolution: node` [angular/angular#5248] - imports: switch to file-relative paths - docs: update readme
1 parent 02b6411 commit 52dc61a

File tree

18 files changed

+33
-1206
lines changed

18 files changed

+33
-1206
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Todo app with Angular 2 and Firebase
55
A simple Todo app example built with **Angular 2**. The app features a **Firebase** backend with **OAuth** authentication, and an **immutable** task list. Try the demo at <a href="https://ng2-todo-app.firebaseapp.com" target="_blank">https://ng2-todo-app.firebaseapp.com</a>.
66

7-
- Angular `2.0.0-alpha.45`
7+
- Angular `2.0.0-alpha.46`
88
- Firebase
99
- JSON Datastore
1010
- OAuth authentication with GitHub, Google, and Twitter

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,27 @@
1111
"start": "./scripts/run.sh"
1212
},
1313
"dependencies": {
14-
"angular2": "2.0.0-alpha.45",
14+
"angular2": "2.0.0-alpha.46",
1515
"es6-module-loader": "~0.17.8",
16-
"es6-shim": "~0.33.10",
16+
"es6-shim": "~0.33.12",
1717
"firebase": "~2.3.1",
1818
"immutable": "~3.7.5",
1919
"systemjs": "~0.19.5"
2020
},
2121
"devDependencies": {
2222
"@reactivex/rxjs": "5.0.0-alpha.7",
23-
"autoprefixer": "~6.0.3",
24-
"browser-sync": "~2.9.11",
23+
"autoprefixer": "~6.1.0",
24+
"browser-sync": "~2.10.0",
2525
"connect-history-api-fallback": "~1.1.0",
2626
"del": "~2.0.2",
2727
"gulp": "gulpjs/gulp.git#4.0",
2828
"gulp-postcss": "~6.0.1",
2929
"gulp-sass": "~2.1.0",
3030
"gulp-sourcemaps": "~1.6.0",
31-
"gulp-tslint": "~3.5.0",
31+
"gulp-tslint": "~3.6.0",
3232
"gulp-typescript": "~2.9.2",
3333
"jasmine-core": "~2.3.4",
34-
"karma": "~0.13.14",
34+
"karma": "~0.13.15",
3535
"karma-chrome-launcher": "~0.2.1",
3636
"karma-jasmine": "~0.3.6",
3737
"minx": "~0.4.14",

src/components/app/app.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Component, NgIf, View } from 'angular2/angular2';
22
import { RouteConfig, RouterOutlet } from 'angular2/router';
3-
import { AuthRouteHelper } from 'core/auth/auth-route-helper';
4-
import { AuthService } from 'core/auth/auth-service';
5-
import { SignIn } from 'components/sign-in/sign-in';
6-
import { Tasks } from 'components/tasks/tasks';
3+
import { AuthRouteHelper } from '../../core/auth/auth-route-helper';
4+
import { AuthService } from '../../core/auth/auth-service';
5+
import { SignIn } from '../sign-in/sign-in';
6+
import { Tasks } from '../tasks/tasks';
77

88

99
@Component({

src/components/sign-in/sign-in.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component, View } from 'angular2/angular2';
22
import { CanActivate, Router } from 'angular2/router';
3-
import { AuthRouteHelper } from 'core/auth/auth-route-helper';
4-
import { AuthService } from 'core/auth/auth-service';
3+
import { AuthRouteHelper } from '../../core/auth/auth-route-helper';
4+
import { AuthService } from '../../core/auth/auth-service';
55

66

77
@Component({

src/components/tasks/task-form/task-form.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component, FORM_DIRECTIVES, View } from 'angular2/angular2';
2-
import { TaskService } from 'core/task/task-service';
2+
import { TaskService } from '../../../core/task/task-service';
33

44

55
@Component({

src/components/tasks/task-item/task-item.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import {
66
View
77
} from 'angular2/angular2';
88

9-
import { ITask } from 'core/task/task';
10-
import { TaskService } from 'core/task/task-service';
11-
import { Autofocus } from 'directives/autofocus-directive';
9+
import { ITask } from '../../../core/task/task';
10+
import { TaskService } from '../../../core/task/task-service';
11+
import { Autofocus } from '../../../directives/autofocus-directive';
1212

1313

1414
@Component({

src/components/tasks/task-list/task-list-filter-pipe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Pipe, PipeTransform } from 'angular2/angular2';
2-
import { ITask } from 'core/task/task';
2+
import { ITask } from '../../../core/task/task';
33

44

55
@Pipe({

src/components/tasks/tasks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Component, OnDestroy, View } from 'angular2/angular2';
22
import { CanActivate } from 'angular2/router';
33
import { List } from 'immutable';
4-
import { AuthRouteHelper } from 'core/auth/auth-route-helper';
5-
import { TaskStore } from 'core/task/task-store';
4+
import { AuthRouteHelper } from '../../core/auth/auth-route-helper';
5+
import { TaskStore } from '../../core/task/task-store';
66
import { TaskForm } from './task-form/task-form';
77
import { TaskList } from './task-list/task-list';
88

src/core/auth/auth-service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { EventEmitter } from 'angular2/angular2';
33

44
export class AuthService {
55
private authData: FirebaseAuthData;
6-
private emitter: EventEmitter = new EventEmitter();
6+
private emitter: EventEmitter<any> = new EventEmitter();
77

88
constructor(private ref: Firebase) {
99
this.authData = this.ref.getAuth();
@@ -43,7 +43,7 @@ export class AuthService {
4343
}
4444

4545
subscribe(next: (authenticated: boolean) => void): any {
46-
let subscription = this.emitter.observer({next});
46+
let subscription = this.emitter.subscribe(next);
4747
this.emit();
4848
return subscription;
4949
}

src/core/task/providers.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { provide } from 'angular2/angular2';
22
import Firebase from 'firebase';
3-
import { AuthService } from 'core/auth/auth-service';
4-
import { TaskService } from 'core/task/task-service';
5-
import { TaskStore } from 'core/task/task-store';
3+
import { AuthService } from '../auth/auth-service';
4+
import { TaskService } from './task-service';
5+
import { TaskStore } from './task-store';
66

77

88
export const TASK_PROVIDERS: any[] = [

src/core/task/task-store.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ITask } from './task';
66
export class TaskStore {
77
list: List<any> = List();
88
ready: Promise<any>;
9-
private emitter: EventEmitter = new EventEmitter();
9+
private emitter: EventEmitter<any> = new EventEmitter();
1010

1111
constructor(private ref: Firebase) {
1212
this.ref.on('child_added', this.created.bind(this));
@@ -21,7 +21,7 @@ export class TaskStore {
2121
}
2222

2323
subscribe(next: (list: List<any>) => void): any {
24-
return this.emitter.observer({next});
24+
return this.emitter.subscribe(next);
2525
}
2626

2727
created(snapshot: FirebaseDataSnapshot): void {

src/main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { bootstrap, provide } from 'angular2/angular2';
22
import { APP_BASE_HREF, ROUTER_PROVIDERS } from 'angular2/router';
33
import Firebase from 'firebase';
4-
import { AUTH_PROVIDERS } from 'core/auth/providers';
5-
import { TASK_PROVIDERS } from 'core/task/providers';
6-
import { App } from 'components/app/app';
4+
import { AUTH_PROVIDERS } from './core/auth/providers';
5+
import { TASK_PROVIDERS } from './core/task/providers';
6+
import { App } from './components/app/app';
77

88

99
Firebase.INTERNAL.forceWebSockets();

tsconfig.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
"compilerOptions": {
55
"declaration": false,
66
"emitDecoratorMetadata": true,
7+
"experimentalAsyncFunctions": true,
78
"experimentalDecorators": true,
89
"listFiles": true,
910
"module": "system",
11+
"moduleResolution": "node",
1012
"noEmitHelpers": false,
1113
"noImplicitAny": false,
1214
"noLib": false,

tsd.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@
55
"path": "typings/tsd",
66
"bundle": "typings/tsd/tsd.d.ts",
77
"installed": {
8-
"es6-shim/es6-shim.d.ts": {
9-
"commit": "62eedc3121a5e28c50473d2e4a9cefbcb9c3957f"
10-
},
11-
"jasmine/jasmine.d.ts": {
12-
"commit": "62eedc3121a5e28c50473d2e4a9cefbcb9c3957f"
13-
},
148
"sinon/sinon.d.ts": {
15-
"commit": "62eedc3121a5e28c50473d2e4a9cefbcb9c3957f"
9+
"commit": "4f7b7e01d3a9622bfab0bef469e169529e60c66b"
1610
}
1711
}
1812
}

typings/custom/custom.d.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
/// <reference path="../../node_modules/angular2/bundles/typings/angular2/angular2.d.ts" />
2-
/// <reference path="../../node_modules/angular2/bundles/typings/angular2/router.d.ts" />
3-
/// <reference path="../../node_modules/angular2/bundles/typings/angular2/testing.d.ts" />
41
/// <reference path="../../node_modules/immutable/dist/immutable.d.ts" />
52
/// <reference path="firebase/firebase.d.ts" />

0 commit comments

Comments
 (0)