init Project ✌️✌️

This commit is contained in:
Kenta420-Poom 2023-09-14 14:52:04 +07:00
commit 8a6dc19bdd
42 changed files with 249179 additions and 0 deletions

View file

@ -0,0 +1,7 @@
<p>home works!</p>
<asl-google-signin-button
type="standard"
shape="pill"
text="signin_with"
size="large"
></asl-google-signin-button>

View file

@ -0,0 +1,21 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { HomeComponent } from './home.component';
describe('HomeComponent', () => {
let component: HomeComponent;
let fixture: ComponentFixture<HomeComponent>;
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [HomeComponent]
});
fixture = TestBed.createComponent(HomeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View file

@ -0,0 +1,23 @@
import {
GoogleSigninButtonModule,
SocialAuthService,
} from '@abacritt/angularx-social-login';
import { Component, OnInit } from '@angular/core';
import { AppModule } from 'src/app/app.module';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.css'],
imports: [GoogleSigninButtonModule],
standalone: true,
})
export class HomeComponent implements OnInit {
constructor(private _authService: SocialAuthService) {}
ngOnInit(): void {
this._authService.authState.subscribe((user) => {
console.log(user);
});
}
}