mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 12:53:03 -05:00
fix: run prettier on all file to avoid prettier issue inside PR
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ApplicationConfig, importProvidersFrom } from '@angular/core';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { ApplicationConfig, importProvidersFrom } from '@angular/core';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [importProvidersFrom(HttpClientModule)],
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { bootstrapApplication } from '@angular/platform-browser';
|
||||
import { appConfig } from './app/app.config';
|
||||
import { AppComponent } from './app/app.component';
|
||||
import { appConfig } from './app/app.config';
|
||||
|
||||
bootstrapApplication(AppComponent, appConfig).catch((err) =>
|
||||
console.error(err)
|
||||
console.error(err),
|
||||
);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
import { AsyncPipe, NgFor } from '@angular/common';
|
||||
import { Component, inject, Input } from '@angular/core';
|
||||
import { Component, Input, inject } from '@angular/core';
|
||||
import { BehaviorSubject, take } from 'rxjs';
|
||||
import { AppService } from './app.service';
|
||||
import { TopicType } from './localDB.service';
|
||||
@@ -29,8 +29,8 @@ export class ButtonDeleteComponent {
|
||||
this.message$$.next(
|
||||
result
|
||||
? `All ${this.topic} have been deleted`
|
||||
: `Error: deletion of some ${this.topic} failed`
|
||||
)
|
||||
: `Error: deletion of some ${this.topic} failed`,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ export class AppService {
|
||||
? topicToDelete
|
||||
.map((t) => this.dbService.deleteOneTopic(t.id))
|
||||
.reduce((acc, curr) => merge(acc, curr), of(true))
|
||||
: of(true)
|
||||
)
|
||||
: of(true),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ export class LocalDBService extends ComponentStore<DBState> {
|
||||
deleteOne = this.updater(
|
||||
(state, id: number): DBState => ({
|
||||
infos: state.infos.filter((i) => i.id !== id),
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
deleteOneTopic = (id: number) =>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { defineConfig } from 'cypress';
|
||||
import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing';
|
||||
import { defineConfig } from 'cypress';
|
||||
|
||||
export default defineConfig({
|
||||
component: nxComponentTestingPreset(__filename),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
@@ -12,7 +12,9 @@ import { TopicService, TopicType } from './topic.service';
|
||||
@Component({
|
||||
standalone: true,
|
||||
selector: 'app-root',
|
||||
template: ` <button (click)="openTopicModal()">Open Topic</button> `,
|
||||
template: `
|
||||
<button (click)="openTopicModal()">Open Topic</button>
|
||||
`,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class AppComponent implements OnInit {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { ApplicationConfig } from '@angular/core';
|
||||
import { importProvidersFrom } from '@angular/core';
|
||||
import { ApplicationConfig, importProvidersFrom } from '@angular/core';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [importProvidersFrom(MatDialogModule)],
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { NgFor } from '@angular/common';
|
||||
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatDialogModule, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
||||
|
||||
@Component({
|
||||
template: ` <h1 mat-dialog-title>Show all Topics</h1>
|
||||
template: `
|
||||
<h1 mat-dialog-title>Show all Topics</h1>
|
||||
<div mat-dialog-content>
|
||||
<ul>
|
||||
<li *ngFor="let topic of data.topics">
|
||||
@@ -14,7 +15,8 @@ import { MatDialogModule, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
</div>
|
||||
<div mat-dialog-actions>
|
||||
<button mat-button mat-dialog-close>Close</button>
|
||||
</div>`,
|
||||
</div>
|
||||
`,
|
||||
imports: [MatDialogModule, MatButtonModule, NgFor],
|
||||
standalone: true,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
@@ -4,5 +4,5 @@ import { bootstrapApplication } from '@angular/platform-browser';
|
||||
import { AppComponent } from './app/app.component';
|
||||
|
||||
bootstrapApplication(AppComponent, appConfig).catch((err) =>
|
||||
console.error(err)
|
||||
console.error(err),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user