Zwischenstand TicTacToe

This commit is contained in:
Oezmen
2022-05-17 15:00:33 +02:00
parent c26be0a343
commit dbe79275ed
8 changed files with 21163 additions and 69 deletions

9
app/package-lock.json generated
View File

@@ -1,5 +1,12 @@
{
"name": "angular-electron",
"version": "10.5.2",
"lockfileVersion": 1
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "angular-electron",
"version": "10.5.2"
}
}
}

21154
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "angular-electron",
"version": "10.5.2",
"name": "TicTacToe",
"version": "0.0.1",
"description": "Angular 13 with Electron 18 (Typescript + SASS + Hot Reload)",
"homepage": "https://github.com/maximegris/angular-electron",
"author": {

View File

@@ -1 +1,4 @@
<router-outlet></router-outlet>
<app-square value="X"></app-square>
<app-square value="O"></app-square>
<app-square value="X"></app-square>

View File

@@ -3,7 +3,7 @@ import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpClientModule, HttpClient } from '@angular/common/http';
import { CoreModule } from './core/core.module';
import { SharedModule } from './shared/shared.module';
import { AppRoutingModule } from './app-routing.module';
@@ -11,24 +11,20 @@ import { AppRoutingModule } from './app-routing.module';
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { HomeModule } from './home/home.module';
import { DetailModule } from './detail/detail.module';
import { AppComponent } from './app.component';
import { SquareComponent } from './square/square.component';
// AoT requires an exported function for factories
const httpLoaderFactory = (http: HttpClient): TranslateHttpLoader => new TranslateHttpLoader(http, './assets/i18n/', '.json');
@NgModule({
declarations: [AppComponent],
declarations: [AppComponent, SquareComponent],
imports: [
BrowserModule,
FormsModule,
HttpClientModule,
CoreModule,
SharedModule,
HomeModule,
DetailModule,
AppRoutingModule,
TranslateModule.forRoot({
loader: {

View File

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

View File

@@ -0,0 +1,23 @@
import { Component, Input, OnInit } from '@angular/core';
@Component({
selector: 'app-square',
template: `
<p>
<button>{{ value }}</button>
</p>
`,
styles: [
]
})
export class SquareComponent {
@Input() value:'X'|'O'
constructor() {
}
}

View File

@@ -1,7 +1,7 @@
{
"PAGES": {
"HOME": {
"TITLE": "App works !",
"TITLE": "App works !!",
"GO_TO_DETAIL": "Go to Detail"
},
"DETAIL": {