Zwischenstand TicTacToe
This commit is contained in:
9
app/package-lock.json
generated
9
app/package-lock.json
generated
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
21156
package-lock.json
generated
21156
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -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": {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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: {
|
||||
|
||||
25
src/app/square/square.component.spec.ts
Normal file
25
src/app/square/square.component.spec.ts
Normal 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();
|
||||
});
|
||||
});
|
||||
23
src/app/square/square.component.ts
Normal file
23
src/app/square/square.component.ts
Normal 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() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"PAGES": {
|
||||
"HOME": {
|
||||
"TITLE": "App works !",
|
||||
"TITLE": "App works !!",
|
||||
"GO_TO_DETAIL": "Go to Detail"
|
||||
},
|
||||
"DETAIL": {
|
||||
|
||||
Reference in New Issue
Block a user