-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix linting issues and run prettier (#36)
- Loading branch information
1 parent
9e90f7f
commit 29a1350
Showing
23 changed files
with
166 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,18 @@ | ||
import { ApplicationConfig, importProvidersFrom, provideExperimentalZonelessChangeDetection } from '@angular/core'; | ||
import { provideRouter } from '@angular/router'; | ||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'; | ||
import { | ||
provideAngularQuery, | ||
QueryClient, | ||
} from '@tanstack/angular-query-experimental' | ||
import {LucideAngularModule, Home } from "lucide-angular"; | ||
import { provideAngularQuery, QueryClient } from '@tanstack/angular-query-experimental'; | ||
import { LucideAngularModule, Home } from 'lucide-angular'; | ||
import { routes } from './app.routes'; | ||
import { BASE_PATH } from './core/modules/openapi'; | ||
|
||
|
||
export const appConfig: ApplicationConfig = { | ||
providers: [ | ||
provideExperimentalZonelessChangeDetection(), | ||
provideRouter(routes), | ||
provideAngularQuery(new QueryClient()), | ||
{ provide: BASE_PATH, useValue: "http://localhost:8080" }, | ||
{ provide: BASE_PATH, useValue: 'http://localhost:8080' }, | ||
provideHttpClient(withInterceptorsFromDi()), | ||
importProvidersFrom(LucideAngularModule.pick({ Home })) | ||
] | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
<div class="border rounded-md p-2 shadow-md"> | ||
<h3 class="text-xl font-medium">Counter Title: {{title()}}</h3> | ||
<p>Value: {{counter()}}<p> | ||
<p>HexValue: {{hexCounter()}}<p> | ||
<app-button (click)="increment()"> | ||
Increment | ||
@if (byCount() > 1) { | ||
by {{byCount()}} | ||
} | ||
</app-button> | ||
<h3 class="text-xl font-medium">Counter Title: {{ title() }}</h3> | ||
<p>Value: {{ counter() }}</p> | ||
<p></p> | ||
<p>HexValue: {{ hexCounter() }}</p> | ||
<p> | ||
<app-button (click)="increment()"> | ||
Increment | ||
@if (byCount() > 1) { | ||
by {{ byCount() }} | ||
} | ||
</app-button> | ||
</p> | ||
|
||
<h4 class="text-lg font-medium">History</h4> | ||
<div> | ||
@for (item of counterHistory(); track item.dec) { | ||
{{ item.dec }} | ||
} | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,34 @@ | ||
import { Component, inject } from '@angular/core'; | ||
import { injectMutation, injectQuery, injectQueryClient } from '@tanstack/angular-query-experimental'; | ||
import { AngularQueryDevtools } from '@tanstack/angular-query-devtools-experimental' | ||
import { AngularQueryDevtools } from '@tanstack/angular-query-devtools-experimental'; | ||
import { lastValueFrom } from 'rxjs'; | ||
import { HelloService } from 'app/core/modules/openapi'; | ||
import { AppButtonComponent } from 'app/ui/button/button/button.component'; | ||
|
||
@Component({ | ||
selector: 'hello', | ||
selector: 'app-hello', | ||
standalone: true, | ||
imports: [AppButtonComponent, AngularQueryDevtools], | ||
templateUrl: './hello.component.html' | ||
}) | ||
export class HelloComponent { | ||
helloService = inject(HelloService) | ||
queryClient = injectQueryClient() | ||
helloService = inject(HelloService); | ||
queryClient = injectQueryClient(); | ||
|
||
query = injectQuery(() => ({ | ||
queryKey: ['hellos'], | ||
queryFn: async () => lastValueFrom(this.helloService.getAllHellos()), | ||
}) | ||
); | ||
queryFn: async () => lastValueFrom(this.helloService.getAllHellos()) | ||
})); | ||
|
||
mutation = injectMutation(() => ({ | ||
mutationFn: () => lastValueFrom(this.helloService.addHello()), | ||
onSuccess: () => | ||
onSuccess: () => | ||
this.queryClient.invalidateQueries({ | ||
queryKey: ['hellos'], | ||
}), | ||
}) | ||
); | ||
queryKey: ['hellos'] | ||
}) | ||
})); | ||
|
||
addHello() { | ||
this.mutation.mutate(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<button [class]="computedClass()" [disabled]="disabled()" (click)="onClick.emit($event)"> | ||
<ng-content /> | ||
</button> | ||
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.