added functions and web-socket to chat in group
This commit is contained in:
@@ -59,9 +59,9 @@ In your Angular project:
|
||||
|
||||
```typescript
|
||||
|
||||
import {ApplicationConfig} from '@angular/core';
|
||||
import {provideHttpClient} from '@angular/common/http';
|
||||
import {provideApi} from '';
|
||||
import { ApplicationConfig } from '@angular/core';
|
||||
import { provideHttpClient } from '@angular/common/http';
|
||||
import { provideApi } from '';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
@@ -73,19 +73,17 @@ export const appConfig: ApplicationConfig = {
|
||||
```
|
||||
|
||||
**NOTE**
|
||||
If you're still using `AppModule` and haven't [migrated](https://angular.dev/reference/migrations/standalone) yet, you
|
||||
can still import an Angular module:
|
||||
|
||||
If you're still using `AppModule` and haven't [migrated](https://angular.dev/reference/migrations/standalone) yet, you can still import an Angular module:
|
||||
```typescript
|
||||
import {ApiModule} from '';
|
||||
import { ApiModule } from '';
|
||||
```
|
||||
|
||||
If different from the generated base path, during app bootstrap, you can provide the base path to your service.
|
||||
|
||||
```typescript
|
||||
import {ApplicationConfig} from '@angular/core';
|
||||
import {provideHttpClient} from '@angular/common/http';
|
||||
import {provideApi} from '';
|
||||
import { ApplicationConfig } from '@angular/core';
|
||||
import { provideHttpClient } from '@angular/common/http';
|
||||
import { provideApi } from '';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
@@ -98,9 +96,9 @@ export const appConfig: ApplicationConfig = {
|
||||
|
||||
```typescript
|
||||
// with a custom configuration
|
||||
import {ApplicationConfig} from '@angular/core';
|
||||
import {provideHttpClient} from '@angular/common/http';
|
||||
import {provideApi} from '';
|
||||
import { ApplicationConfig } from '@angular/core';
|
||||
import { provideHttpClient } from '@angular/common/http';
|
||||
import { provideApi } from '';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
@@ -117,9 +115,9 @@ export const appConfig: ApplicationConfig = {
|
||||
|
||||
```typescript
|
||||
// with factory building a custom configuration
|
||||
import {ApplicationConfig} from '@angular/core';
|
||||
import {provideHttpClient} from '@angular/common/http';
|
||||
import {provideApi, Configuration} from '';
|
||||
import { ApplicationConfig } from '@angular/core';
|
||||
import { provideHttpClient } from '@angular/common/http';
|
||||
import { provideApi, Configuration } from '';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
@@ -128,10 +126,10 @@ export const appConfig: ApplicationConfig = {
|
||||
{
|
||||
provide: Configuration,
|
||||
useFactory: (authService: AuthService) => new Configuration({
|
||||
basePath: 'http://localhost:9999',
|
||||
withCredentials: true,
|
||||
username: authService.getUsername(),
|
||||
password: authService.getPassword(),
|
||||
basePath: 'http://localhost:9999',
|
||||
withCredentials: true,
|
||||
username: authService.getUsername(),
|
||||
password: authService.getPassword(),
|
||||
}),
|
||||
deps: [AuthService],
|
||||
multi: false
|
||||
@@ -147,10 +145,10 @@ you can create an alias name when importing the modules
|
||||
in order to avoid naming conflicts:
|
||||
|
||||
```typescript
|
||||
import {provideApi as provideUserApi} from 'my-user-api-path';
|
||||
import {provideApi as provideAdminApi} from 'my-admin-api-path';
|
||||
import {HttpClientModule} from '@angular/common/http';
|
||||
import {environment} from '../environments/environment';
|
||||
import { provideApi as provideUserApi } from 'my-user-api-path';
|
||||
import { provideApi as provideAdminApi } from 'my-admin-api-path';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { environment } from '../environments/environment';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
@@ -183,7 +181,5 @@ new Configuration({
|
||||
```
|
||||
|
||||
[parameter-locations-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-locations
|
||||
|
||||
[style-values-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values
|
||||
|
||||
[@honoluluhenk/http-param-expander]: https://www.npmjs.com/package/@honoluluhenk/http-param-expander
|
||||
|
||||
Reference in New Issue
Block a user