File tree Expand file tree Collapse file tree 17 files changed +425
-0
lines changed
modules/openapi-generator/src/main/resources/typescript-angular
typescript-angular-v4/npm
typescript-angular-v4.3/npm
typescript-angular-v6-not-provided-in-root/builds
typescript-angular-v6-provided-in-root/builds
typescript-angular-v7-not-provided-in-root/builds
typescript-angular-v7-provided-in-root/builds
typescript-angular-v8-provided-in-root/builds
with-prefixed-module-name Expand file tree Collapse file tree 17 files changed +425
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,31 @@ export function apiConfigFactory (): Configuration => {
107
107
export class AppModule { }
108
108
```
109
109
110
+ ```
111
+ // configuring providers with an authentication service that manages your access tokens
112
+ import { ApiModule, Configuration } from '{ {npmName} }';
113
+
114
+ @NgModule({
115
+ imports: [ ApiModule ],
116
+ declarations: [ AppComponent ],
117
+ providers: [
118
+ {
119
+ provide: Configuration,
120
+ useFactory: (authService: AuthService) => new Configuration(
121
+ {
122
+ basePath: environment.apiUrl,
123
+ accessToken: authService.getAccessToken.bind(authService)
124
+ }
125
+ ),
126
+ deps: [AuthService],
127
+ multi: false
128
+ }
129
+ ],
130
+ bootstrap: [ AppComponent ]
131
+ })
132
+ export class AppModule { }
133
+ ```
134
+
110
135
```
111
136
import { DefaultApi } from '{ {npmName} }';
112
137
Original file line number Diff line number Diff line change @@ -90,6 +90,31 @@ export function apiConfigFactory (): Configuration => {
90
90
export class AppModule {}
91
91
```
92
92
93
+ ```
94
+ // configuring providers with an authentication service that manages your access tokens
95
+ import { ApiModule, Configuration } from '';
96
+
97
+ @NgModule({
98
+ imports: [ ApiModule ],
99
+ declarations: [ AppComponent ],
100
+ providers: [
101
+ {
102
+ provide: Configuration,
103
+ useFactory: (authService: AuthService) => new Configuration(
104
+ {
105
+ basePath: environment.apiUrl,
106
+ accessToken: authService.getAccessToken.bind(authService)
107
+ }
108
+ ),
109
+ deps: [AuthService],
110
+ multi: false
111
+ }
112
+ ],
113
+ bootstrap: [ AppComponent ]
114
+ })
115
+ export class AppModule {}
116
+ ```
117
+
93
118
```
94
119
import { DefaultApi } from '';
95
120
Original file line number Diff line number Diff line change @@ -90,6 +90,31 @@ export function apiConfigFactory (): Configuration => {
90
90
export class AppModule {}
91
91
```
92
92
93
+ ```
94
+ // configuring providers with an authentication service that manages your access tokens
95
+ import { ApiModule, Configuration } from '@openapitools/angular2-typescript-petstore';
96
+
97
+ @NgModule({
98
+ imports: [ ApiModule ],
99
+ declarations: [ AppComponent ],
100
+ providers: [
101
+ {
102
+ provide: Configuration,
103
+ useFactory: (authService: AuthService) => new Configuration(
104
+ {
105
+ basePath: environment.apiUrl,
106
+ accessToken: authService.getAccessToken.bind(authService)
107
+ }
108
+ ),
109
+ deps: [AuthService],
110
+ multi: false
111
+ }
112
+ ],
113
+ bootstrap: [ AppComponent ]
114
+ })
115
+ export class AppModule {}
116
+ ```
117
+
93
118
```
94
119
import { DefaultApi } from '@openapitools/angular2-typescript-petstore';
95
120
Original file line number Diff line number Diff line change @@ -90,6 +90,31 @@ export function apiConfigFactory (): Configuration => {
90
90
export class AppModule {}
91
91
```
92
92
93
+ ```
94
+ // configuring providers with an authentication service that manages your access tokens
95
+ import { ApiModule, Configuration } from '';
96
+
97
+ @NgModule({
98
+ imports: [ ApiModule ],
99
+ declarations: [ AppComponent ],
100
+ providers: [
101
+ {
102
+ provide: Configuration,
103
+ useFactory: (authService: AuthService) => new Configuration(
104
+ {
105
+ basePath: environment.apiUrl,
106
+ accessToken: authService.getAccessToken.bind(authService)
107
+ }
108
+ ),
109
+ deps: [AuthService],
110
+ multi: false
111
+ }
112
+ ],
113
+ bootstrap: [ AppComponent ]
114
+ })
115
+ export class AppModule {}
116
+ ```
117
+
93
118
```
94
119
import { DefaultApi } from '';
95
120
Original file line number Diff line number Diff line change @@ -92,6 +92,31 @@ export function apiConfigFactory (): Configuration => {
92
92
export class AppModule {}
93
93
```
94
94
95
+ ```
96
+ // configuring providers with an authentication service that manages your access tokens
97
+ import { ApiModule, Configuration } from '@openapitools/angular2-typescript-petstore';
98
+
99
+ @NgModule({
100
+ imports: [ ApiModule ],
101
+ declarations: [ AppComponent ],
102
+ providers: [
103
+ {
104
+ provide: Configuration,
105
+ useFactory: (authService: AuthService) => new Configuration(
106
+ {
107
+ basePath: environment.apiUrl,
108
+ accessToken: authService.getAccessToken.bind(authService)
109
+ }
110
+ ),
111
+ deps: [AuthService],
112
+ multi: false
113
+ }
114
+ ],
115
+ bootstrap: [ AppComponent ]
116
+ })
117
+ export class AppModule {}
118
+ ```
119
+
95
120
```
96
121
import { DefaultApi } from '@openapitools/angular2-typescript-petstore';
97
122
Original file line number Diff line number Diff line change @@ -90,6 +90,31 @@ export function apiConfigFactory (): Configuration => {
90
90
export class AppModule {}
91
91
```
92
92
93
+ ```
94
+ // configuring providers with an authentication service that manages your access tokens
95
+ import { ApiModule, Configuration } from '@openapitools/angular2-typescript-petstore';
96
+
97
+ @NgModule({
98
+ imports: [ ApiModule ],
99
+ declarations: [ AppComponent ],
100
+ providers: [
101
+ {
102
+ provide: Configuration,
103
+ useFactory: (authService: AuthService) => new Configuration(
104
+ {
105
+ basePath: environment.apiUrl,
106
+ accessToken: authService.getAccessToken.bind(authService)
107
+ }
108
+ ),
109
+ deps: [AuthService],
110
+ multi: false
111
+ }
112
+ ],
113
+ bootstrap: [ AppComponent ]
114
+ })
115
+ export class AppModule {}
116
+ ```
117
+
93
118
```
94
119
import { DefaultApi } from '@openapitools/angular2-typescript-petstore';
95
120
Original file line number Diff line number Diff line change @@ -92,6 +92,31 @@ export function apiConfigFactory (): Configuration => {
92
92
export class AppModule {}
93
93
```
94
94
95
+ ```
96
+ // configuring providers with an authentication service that manages your access tokens
97
+ import { ApiModule, Configuration } from '';
98
+
99
+ @NgModule({
100
+ imports: [ ApiModule ],
101
+ declarations: [ AppComponent ],
102
+ providers: [
103
+ {
104
+ provide: Configuration,
105
+ useFactory: (authService: AuthService) => new Configuration(
106
+ {
107
+ basePath: environment.apiUrl,
108
+ accessToken: authService.getAccessToken.bind(authService)
109
+ }
110
+ ),
111
+ deps: [AuthService],
112
+ multi: false
113
+ }
114
+ ],
115
+ bootstrap: [ AppComponent ]
116
+ })
117
+ export class AppModule {}
118
+ ```
119
+
95
120
```
96
121
import { DefaultApi } from '';
97
122
Original file line number Diff line number Diff line change @@ -92,6 +92,31 @@ export function apiConfigFactory (): Configuration => {
92
92
export class AppModule {}
93
93
```
94
94
95
+ ```
96
+ // configuring providers with an authentication service that manages your access tokens
97
+ import { ApiModule, Configuration } from '@openapitools/typescript-angular-petstore';
98
+
99
+ @NgModule({
100
+ imports: [ ApiModule ],
101
+ declarations: [ AppComponent ],
102
+ providers: [
103
+ {
104
+ provide: Configuration,
105
+ useFactory: (authService: AuthService) => new Configuration(
106
+ {
107
+ basePath: environment.apiUrl,
108
+ accessToken: authService.getAccessToken.bind(authService)
109
+ }
110
+ ),
111
+ deps: [AuthService],
112
+ multi: false
113
+ }
114
+ ],
115
+ bootstrap: [ AppComponent ]
116
+ })
117
+ export class AppModule {}
118
+ ```
119
+
95
120
```
96
121
import { DefaultApi } from '@openapitools/typescript-angular-petstore';
97
122
Original file line number Diff line number Diff line change @@ -92,6 +92,31 @@ export function apiConfigFactory (): Configuration => {
92
92
export class AppModule {}
93
93
```
94
94
95
+ ```
96
+ // configuring providers with an authentication service that manages your access tokens
97
+ import { ApiModule, Configuration } from '';
98
+
99
+ @NgModule({
100
+ imports: [ ApiModule ],
101
+ declarations: [ AppComponent ],
102
+ providers: [
103
+ {
104
+ provide: Configuration,
105
+ useFactory: (authService: AuthService) => new Configuration(
106
+ {
107
+ basePath: environment.apiUrl,
108
+ accessToken: authService.getAccessToken.bind(authService)
109
+ }
110
+ ),
111
+ deps: [AuthService],
112
+ multi: false
113
+ }
114
+ ],
115
+ bootstrap: [ AppComponent ]
116
+ })
117
+ export class AppModule {}
118
+ ```
119
+
95
120
```
96
121
import { DefaultApi } from '';
97
122
Original file line number Diff line number Diff line change @@ -92,6 +92,31 @@ export function apiConfigFactory (): Configuration => {
92
92
export class AppModule {}
93
93
```
94
94
95
+ ```
96
+ // configuring providers with an authentication service that manages your access tokens
97
+ import { ApiModule, Configuration } from '@openapitools/typescript-angular-petstore';
98
+
99
+ @NgModule({
100
+ imports: [ ApiModule ],
101
+ declarations: [ AppComponent ],
102
+ providers: [
103
+ {
104
+ provide: Configuration,
105
+ useFactory: (authService: AuthService) => new Configuration(
106
+ {
107
+ basePath: environment.apiUrl,
108
+ accessToken: authService.getAccessToken.bind(authService)
109
+ }
110
+ ),
111
+ deps: [AuthService],
112
+ multi: false
113
+ }
114
+ ],
115
+ bootstrap: [ AppComponent ]
116
+ })
117
+ export class AppModule {}
118
+ ```
119
+
95
120
```
96
121
import { DefaultApi } from '@openapitools/typescript-angular-petstore';
97
122
Original file line number Diff line number Diff line change @@ -92,6 +92,31 @@ export function apiConfigFactory (): Configuration => {
92
92
export class AppModule {}
93
93
```
94
94
95
+ ```
96
+ // configuring providers with an authentication service that manages your access tokens
97
+ import { ApiModule, Configuration } from '';
98
+
99
+ @NgModule({
100
+ imports: [ ApiModule ],
101
+ declarations: [ AppComponent ],
102
+ providers: [
103
+ {
104
+ provide: Configuration,
105
+ useFactory: (authService: AuthService) => new Configuration(
106
+ {
107
+ basePath: environment.apiUrl,
108
+ accessToken: authService.getAccessToken.bind(authService)
109
+ }
110
+ ),
111
+ deps: [AuthService],
112
+ multi: false
113
+ }
114
+ ],
115
+ bootstrap: [ AppComponent ]
116
+ })
117
+ export class AppModule {}
118
+ ```
119
+
95
120
```
96
121
import { DefaultApi } from '';
97
122
Original file line number Diff line number Diff line change @@ -92,6 +92,31 @@ export function apiConfigFactory (): Configuration => {
92
92
export class AppModule {}
93
93
```
94
94
95
+ ```
96
+ // configuring providers with an authentication service that manages your access tokens
97
+ import { ApiModule, Configuration } from '@openapitools/typescript-angular-petstore';
98
+
99
+ @NgModule({
100
+ imports: [ ApiModule ],
101
+ declarations: [ AppComponent ],
102
+ providers: [
103
+ {
104
+ provide: Configuration,
105
+ useFactory: (authService: AuthService) => new Configuration(
106
+ {
107
+ basePath: environment.apiUrl,
108
+ accessToken: authService.getAccessToken.bind(authService)
109
+ }
110
+ ),
111
+ deps: [AuthService],
112
+ multi: false
113
+ }
114
+ ],
115
+ bootstrap: [ AppComponent ]
116
+ })
117
+ export class AppModule {}
118
+ ```
119
+
95
120
```
96
121
import { DefaultApi } from '@openapitools/typescript-angular-petstore';
97
122
You can’t perform that action at this time.
0 commit comments