Skip to content

Commit

Permalink
angularFire installed
Browse files Browse the repository at this point in the history
Followed install instructions from
https://github.com/angular/angularfire2 but getting errors on firebase
namespace as per angular/angularfire#461
  • Loading branch information
ashmccallum committed Aug 30, 2016
1 parent aea143b commit af51b19
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 4 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"@angular2-material/icon": "^2.0.0-alpha.7-4",
"@angular2-material/input": "^2.0.0-alpha.7-4",
"@angular2-material/sidenav": "^2.0.0-alpha.7-4",
"angularfire2": "^2.0.0-beta.4",
"core-js": "^2.4.0",
"firebase": "^3.3.0",
"reflect-metadata": "0.1.3",
"rxjs": "5.0.0-beta.6",
"ts-helpers": "^1.1.1",
Expand Down
15 changes: 14 additions & 1 deletion src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
<h1>
{{title}}
</h1>
<!--<div>
<md-list>
<md-list-item class="text" *ngFor="let item of items | async">
{{item.$value}}
</md-list-item>
</md-list>
</div>-->
<div>
<md-checkbox></md-checkbox>
</div>
<div>
<button md-raised-button color="primary">Click Me</button>
</div>
<div>
<md-input placeholder="amount" align="end">
<span md-prefix>$&nbsp;</span>
<span md-suffix>.00</span>
</md-input>
</h1>
</div>
8 changes: 6 additions & 2 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import { Component } from '@angular/core';

import { MdCheckbox } from '@angular2-material/checkbox';
import { AngularFire, FirebaseListObservable } from 'angularfire2';

@Component({
selector: 'app-root',
templateUrl: 'app.component.html',
styleUrls: ['app.component.css'],
directives: [MdCheckbox]
directives: []
})
export class AppComponent {
//items: FirebaseListObservable<any[]>;
constructor(af: AngularFire) {
//this.items = af.database.list('items');
}
title = 'Someone told me: app works!';
}
14 changes: 13 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,19 @@ import { MdButtonModule } from '@angular2-material/button';
import { MdSidenavModule } from '@angular2-material/sidenav';
import { MdIconModule } from '@angular2-material/icon';
import { MdInputModule } from '@angular2-material/input';
import { MdListModule } from '@angular2-material/list';

import { AppComponent } from './app.component';

import { AngularFireModule } from 'angularfire2';

export const firebaseConfig = {
apiKey: "AIzaSyBzQ2EqcAa8qX0hHc1Zn1fsB8fwHCZaxOY",
authDomain: "home-move-tool.firebaseapp.com",
databaseURL: "https://home-move-tool.firebaseio.com",
storageBucket: "home-move-tool.appspot.com"
}

@NgModule({
declarations: [
AppComponent
Expand All @@ -23,7 +33,9 @@ import { AppComponent } from './app.component';
MdSidenavModule,
MdCheckboxModule,
MdIconModule,
MdInputModule
MdInputModule,
MdListModule,
AngularFireModule.initializeApp(firebaseConfig)
],
providers: [],
entryComponents: [AppComponent],
Expand Down

0 comments on commit af51b19

Please sign in to comment.