diff --git a/package.json b/package.json index 578e37c..374c3c6 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "build": "ng build", "watch": "ng build --watch --configuration development", "test": "ng test", + "serve": "ng serve --host 0.0.0.0 --port 4200", "serve:ssr:vb": "node dist/vb/server/server.mjs" }, "private": true, @@ -48,4 +49,4 @@ "karma-jasmine-html-reporter": "~2.1.0", "typescript": "~5.6.2" } -} \ No newline at end of file +} diff --git a/src/app/app.component.html b/src/app/app.component.html index b2af5bd..96abb9d 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -2,61 +2,59 @@ *{ text-align: center; } - mat-button-toggle-group{ - margin-bottom: 6px; - } - #nTeamsText{ - margin-left: 6px; - }
- +

Please select the number of teams:

-
- - - Two - Three - n - - - n Teams - - + -
- - Names - - -
- +
+ - - - - - - + +
Size{{element.length}}
+ + + + + + + + @for (team of teamsArray; track $index) { + + + + + } + +
SizeNames
{{ team.length | number }}{{ team }}
- - Names - {{element}} - - - - - - - +
diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 248d3f5..41cc671 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,17 +1,13 @@ import { Component } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { RouterOutlet } from '@angular/router'; -import {MatButtonToggleChange, MatButtonToggleModule} from '@angular/material/button-toggle'; -import {MatButtonModule} from '@angular/material/button'; -import {MatInputModule} from '@angular/material/input'; -import {MatFormFieldModule} from '@angular/material/form-field'; -import {MatTableModule} from '@angular/material/table'; -import {MatGridListModule} from '@angular/material/grid-list'; +import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; + import { CommonModule } from '@angular/common'; @Component({ selector: 'app-root', - imports: [RouterOutlet, MatButtonToggleModule, MatButtonModule, MatInputModule, MatFormFieldModule, MatTableModule, MatGridListModule, CommonModule, FormsModule], + imports: [NgbModule, RouterOutlet, CommonModule, FormsModule], templateUrl: './app.component.html', styleUrl: './app.component.less' }) @@ -23,10 +19,6 @@ export class AppComponent { teamsArray: string[][] = []; displayedColumns = ["teamCount", "teamNames"]; - onNumTeamsSelector(event: MatButtonToggleChange): void{ - this.numTeamsSelectorValue = event.value; - } - onButtonGenerate(textinput: string): void{ if(this.numTeamsSelectorValue === 'n'){ this.numTeamsSelected = Number(this.nTeamsValue);