Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
maheedhar1998 committed Mar 2, 2020
1 parent 7f90a51 commit 94a5e6b
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 9 deletions.
20 changes: 20 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@
"@angular/platform-browser": "~8.1.2",
"@angular/platform-browser-dynamic": "~8.1.2",
"@angular/router": "~8.1.2",
"@ionic-native/call-number": "^5.22.0",
"@ionic-native/core": "^5.0.0",
"@ionic-native/facebook": "^5.20.0",
"@ionic-native/qr-scanner": "^5.17.1",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/status-bar": "^5.19.1",
"@ionic/angular": "^4.7.1",
"call-number": "^1.0.1",
"cordova": "^9.0.0",
"cordova-android": "^8.1.0",
"cordova-browser": "6.0.0",
Expand Down Expand Up @@ -96,7 +98,8 @@
"APP_NAME": "Connect :)",
"FACEBOOK_HYBRID_APP_EVENTS": "false",
"FACEBOOK_ANDROID_SDK_VERSION": "5.5.2"
}
},
"mx.ferreyra.callnumber": {}
},
"platforms": [
"android",
Expand Down
4 changes: 3 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import firebaseConfig from '../../firebaseConfig'
import * as firebase from 'firebase';
import { CallNumber } from '@ionic-native/call-number/ngx';

@NgModule({
declarations: [AppComponent],
Expand All @@ -20,7 +21,8 @@ import * as firebase from 'firebase';
StatusBar,
QRScanner,
SplashScreen,
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
CallNumber
],
bootstrap: [AppComponent]
})
Expand Down
3 changes: 2 additions & 1 deletion src/app/contacts/contacts2.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const routes: Routes = [
IonicModule,
RouterModule.forChild(routes)
],
declarations: []
declarations: [],
exports: [ContactsPage]
})
export class Contacts2PageModule {}
9 changes: 7 additions & 2 deletions src/app/profile/profile.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Router } from '@angular/router';
import * as backend from '../backendClasses';
import { PopoverController } from '@ionic/angular';
import { ContactsPage } from '../contacts/contacts.page';
// import {hmTouchEvents} from '';
import { CallNumber } from '@ionic-native/call-number/ngx';

@Component({
selector: 'app-profile',
Expand All @@ -16,7 +16,7 @@ export class ProfilePage implements OnInit {
private profile: backend.user;
private firebase: FirebaseBackendService;
private grid: {name: string, logo: string} [][] = [];
constructor(private router: Router, private popOver: PopoverController) {
constructor(private router: Router, private popOver: PopoverController, private callNum: CallNumber) {
firebase.auth().onAuthStateChanged(firebaseUser => {
if(!firebaseUser)
{
Expand Down Expand Up @@ -56,6 +56,11 @@ export class ProfilePage implements OnInit {
});
return await pop.present();
}
call() {
this.callNum.callNumber(this.profile.getPhoneNumber, true).then( res => {
console.log("success");
});
}
initGrid() {
let names: string[] = this.getNames();
let logos: string[] = this.getLogos();
Expand Down
7 changes: 3 additions & 4 deletions src/app/user-contact/user-contact.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Routes, RouterModule } from '@angular/router';
import { IonicModule } from '@ionic/angular';

import { UserContactPage } from './user-contact.page';
import { Contacts2PageModule } from '../contacts/contacts2.module';
import { ContactsPage } from '../contacts/contacts2.module';

const routes: Routes = [
{
Expand All @@ -23,9 +23,8 @@ const routes: Routes = [
RouterModule.forChild(routes)
],
declarations: [
UserContactPage,
Contacts2PageModule
UserContactPage
],
entryComponents: [Contacts2PageModule]
entryComponents: [ContactsPage]
})
export class UserContactPageModule {}

0 comments on commit 94a5e6b

Please sign in to comment.