This commit is contained in:
Olu Amey
2020-01-10 23:03:15 -05:00
parent 84b60b5329
commit 887c6f4805
3 changed files with 33 additions and 1 deletions
+12
View File
@@ -0,0 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { UserService } from './user.service';
describe('UserService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: UserService = TestBed.get(UserService);
expect(service).toBeTruthy();
});
});
+15
View File
@@ -0,0 +1,15 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class UserService {
constructor() { }
connectUser(){
alert('1202020');
}
}
+6 -1
View File
@@ -1,4 +1,6 @@
import { Component , ViewChild} from '@angular/core';
import { UserService } from '../services/api/user.service';
@Component({
selector: 'app-tab1',
@@ -9,8 +11,11 @@ export class Tab1Page {
@ViewChild('jubapage') jubapage:any;
constructor (public UserS :UserService){
}
goConnect(){
alert(this.jubapage);
this.UserS.connectUser();
}
}