fix
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class UserService {
|
||||
|
||||
constructor() { }
|
||||
|
||||
connectUser(){
|
||||
alert('1202020');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user