File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { Provider } from '@angular/core' ;
2
+ import { UPLOADX_OPTIONS , UploadxOptions } from './options' ;
3
+
4
+ /**
5
+ * Provides configuration options for standalone app.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * bootstrapApplication(AppComponent, {
10
+ * providers: [
11
+ * provideUploadx({
12
+ * endpoint: uploadUrl,
13
+ * allowedTypes: 'video/*,audio/*',
14
+ * maxChunkSize: 96 * 1024 * 1024
15
+ * })
16
+ * ]
17
+ * });
18
+ * ```
19
+ */
20
+ export function provideUploadx ( options : UploadxOptions = { } ) {
21
+ const providers : Provider [ ] = [
22
+ {
23
+ provide : UPLOADX_OPTIONS ,
24
+ useValue : options
25
+ }
26
+ ] ;
27
+ return providers ;
28
+ }
Original file line number Diff line number Diff line change @@ -12,5 +12,6 @@ export * from './lib/uploaderx';
12
12
export * from './lib/uploadx-drop.directive' ;
13
13
export * from './lib/uploadx.directive' ;
14
14
export * from './lib/uploadx.module' ;
15
+ export * from './lib/uploadx.provider' ;
15
16
export * from './lib/uploadx.service' ;
16
17
export * from './lib/utils' ;
You can’t perform that action at this time.
0 commit comments