Skip to content

Commit 25f4873

Browse files
triniwizNathanWalker
authored andcommitted
feat: admob, analytics, auth , core, database & firestore
1 parent fbd8960 commit 25f4873

File tree

112 files changed

+4028
-23
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+4028
-23
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ npm run setup
55
npm start
66
```
77

8-
- @nativescript
8+
- @nativescript/firebase-admob
9+
- @nativescript/firebase-analytics
10+
- @nativescript/firebase-auth
11+
- @nativescript/firebase-core
12+
- @nativescript/firebase-database
13+
- @nativescript/firebase-firestore
914

1015
# How to use?
1116

apps/demo-angular/package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
{
22
"main": "./src/main.ts",
33
"dependencies": {
4-
"@nativescript/core": "file:../../node_modules/@nativescript/core"
4+
"@nativescript/core": "file:../../node_modules/@nativescript/core",
5+
"@nativescript/firebase-core": "file:../../dist/packages/firebase-core",
6+
"@nativescript/firebase-auth": "file:../../dist/packages/firebase-auth",
7+
"@nativescript/firebase-database": "file:../../dist/packages/firebase-database",
8+
"@nativescript/firebase-firestore": "file:../../dist/packages/firebase-firestore",
9+
"@nativescript/firebase-analytics": "file:../../dist/packages/firebase-analytics",
10+
"@nativescript/firebase-admob": "file:../../dist/packages/firebase-admob"
511
},
612
"devDependencies": {
713
"@nativescript/android": "8.0.0",

apps/demo-angular/src/app-routing.module.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ import { HomeComponent } from './home.component';
66

77
const routes: Routes = [
88
{ path: '', redirectTo: '/home', pathMatch: 'full' },
9-
{ path: 'home', component: HomeComponent }
9+
{ path: 'home', component: HomeComponent },
10+
{ path: 'firebase-admob', loadChildren: () => import('./plugin-demos/firebase-admob.module').then(m => m.FirebaseAdmobModule) },
11+
{ path: 'firebase-analytics', loadChildren: () => import('./plugin-demos/firebase-analytics.module').then(m => m.FirebaseAnalyticsModule) },
12+
{ path: 'firebase-auth', loadChildren: () => import('./plugin-demos/firebase-auth.module').then(m => m.FirebaseAuthModule) },
13+
{ path: 'firebase-core', loadChildren: () => import('./plugin-demos/firebase-core.module').then(m => m.FirebaseCoreModule) },
14+
{ path: 'firebase-database', loadChildren: () => import('./plugin-demos/firebase-database.module').then(m => m.FirebaseDatabaseModule) },
15+
{ path: 'firebase-firestore', loadChildren: () => import('./plugin-demos/firebase-firestore.module').then(m => m.FirebaseFirestoreModule) }
1016
];
1117

1218
@NgModule({

apps/demo-angular/src/home.component.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,22 @@ import { Component } from '@angular/core';
77
export class HomeComponent {
88
demos = [
99
{
10-
name: 'add a package first'
10+
name: 'firebase-admob'
11+
},
12+
{
13+
name: 'firebase-analytics'
14+
},
15+
{
16+
name: 'firebase-auth'
17+
},
18+
{
19+
name: 'firebase-core'
20+
},
21+
{
22+
name: 'firebase-database'
23+
},
24+
{
25+
name: 'firebase-firestore'
1126
}
1227
];
1328
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<ActionBar title="firebase-admob" class="action-bar"> </ActionBar>
2+
<StackLayout class="p-20">
3+
<ScrollView class="h-full">
4+
<StackLayout>
5+
<Button text="Test firebase-admob" (tap)="demoShared.testIt()" class="btn btn-primary"></Button>
6+
</StackLayout>
7+
</ScrollView>
8+
</StackLayout>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Component, NgZone } from '@angular/core';
2+
import { DemoSharedFirebaseAdmob } from '@demo/shared';
3+
import { } from '@nativescript/firebase-admob';
4+
5+
@Component({
6+
selector: 'demo-firebase-admob',
7+
templateUrl: 'firebase-admob.component.html',
8+
})
9+
export class FirebaseAdmobComponent {
10+
11+
demoShared: DemoSharedFirebaseAdmob;
12+
13+
constructor(private _ngZone: NgZone) {}
14+
15+
ngOnInit() {
16+
this.demoShared = new DemoSharedFirebaseAdmob();
17+
}
18+
19+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
2+
import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular';
3+
import { FirebaseAdmobComponent } from './firebase-admob.component';
4+
5+
@NgModule({
6+
imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: FirebaseAdmobComponent }])],
7+
declarations: [FirebaseAdmobComponent],
8+
schemas: [ NO_ERRORS_SCHEMA]
9+
})
10+
export class FirebaseAdmobModule {}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<ActionBar title="firebase-auth" class="action-bar"> </ActionBar>
2+
<StackLayout class="p-20">
3+
<ScrollView class="h-full">
4+
<StackLayout>
5+
<Button text="Test firebase-auth" (tap)="demoShared.testIt()" class="btn btn-primary"></Button>
6+
</StackLayout>
7+
</ScrollView>
8+
</StackLayout>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Component, NgZone } from '@angular/core';
2+
import { DemoSharedFirebaseAuth } from '@demo/shared';
3+
import { } from '@nativescript/firebase-auth';
4+
5+
@Component({
6+
selector: 'demo-firebase-auth',
7+
templateUrl: 'firebase-auth.component.html',
8+
})
9+
export class FirebaseAuthComponent {
10+
11+
demoShared: DemoSharedFirebaseAuth;
12+
13+
constructor(private _ngZone: NgZone) {}
14+
15+
ngOnInit() {
16+
this.demoShared = new DemoSharedFirebaseAuth();
17+
}
18+
19+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
2+
import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular';
3+
import { FirebaseAuthComponent } from './firebase-auth.component';
4+
5+
@NgModule({
6+
imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: FirebaseAuthComponent }])],
7+
declarations: [FirebaseAuthComponent],
8+
schemas: [ NO_ERRORS_SCHEMA]
9+
})
10+
export class FirebaseAuthModule {}

0 commit comments

Comments
 (0)