Skip to content

Commit 7aeca52

Browse files
committed
Readme update
1 parent c4b653a commit 7aeca52

File tree

1 file changed

+36
-35
lines changed

1 file changed

+36
-35
lines changed

README.md

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,22 @@ The library includes 2 Components:
3030
In order to use the SDK, you need to provide it with a few configuration parameters. The configuration parameters must be passed to the `ImagekitioAngularModule` module in your `app.module.ts` file. example:
3131

3232
```js
33-
@NgModule({
34-
declarations: [
35-
AppComponent
36-
],
37-
imports: [
38-
BrowserModule,
39-
AppRoutingModule,
40-
ImagekitioAngularModule.forRoot({
41-
publicKey: environment.publicKey,
42-
urlEndpoint: environment.urlEndpoint,
43-
authenticationEndpoint: environment.authenticationEndpoint
44-
})
45-
],
46-
providers: [],
47-
bootstrap: [AppComponent]
33+
@NgModule({
34+
declarations: [
35+
AppComponent
36+
],
37+
imports: [
38+
BrowserModule,
39+
AppRoutingModule,
40+
ImagekitioAngularModule.forRoot({
41+
publicKey: environment.publicKey,
42+
urlEndpoint: environment.urlEndpoint,
43+
authenticationEndpoint: environment.authenticationEndpoint
4844
})
45+
],
46+
providers: [],
47+
bootstrap: [AppComponent]
48+
})
4949
```
5050

5151
`publicKey` and `urlEndpoint` are mandatory parameters for SDK initialization.
@@ -61,22 +61,23 @@ The ik-image component defines an ImageKit Image tag. example usage:
6161
#### Using image path and image hostname or endpoint
6262

6363
```js
64-
<ik-image path="/default-image.jpg" transformation={[{
65-
"height": "300",
66-
"width": "400"
67-
}]}></ik-image>
68-
```
64+
<ik-image path="/default-image.jpg" transformation={[{
65+
"height": "300",
66+
"width": "400"
67+
}]}></ik-image>
68+
```
69+
6970
#### Using full image URL
7071

71-
```js
72-
<ik-image
73-
src="<full_image_url_from_db>"
74-
transformation={[{
75-
"height": "300",
76-
"width": "400"
77-
}]}
78-
></ik-image>
79-
```
72+
```js
73+
<ik-image
74+
src="<full_image_url_from_db>"
75+
transformation={[{
76+
"height": "300",
77+
"width": "400"
78+
}]}
79+
></ik-image>
80+
```
8081

8182
`src` is the complete URL that is already mapped to ImageKit.
8283
`path` is the location of the image in the ImageKit cloud. `urlEndpoint` + `path` makes the complete url.
@@ -182,18 +183,18 @@ An example of this server is provided in the sample-server folder of the SDK.
182183

183184
Sample Usage
184185
```js
185-
// Simple upload
186-
<ik-upload fileName="my-upload" /></ik-upload>
186+
// Simple upload
187+
<ik-upload fileName="my-upload" /></ik-upload>
187188

188-
// Using callbacks and other parameters of upload API
189-
<ik-upload fileName="test_new" [useUniqueFileName]="false" [isPrivateFile]="true"
190-
(onSuccess)="handleUploadSuccess($event)" (onError)="handleUploadError($event)"></ik-upload>
189+
// Using callbacks and other parameters of upload API
190+
<ik-upload fileName="test_new" [useUniqueFileName]="false" [isPrivateFile]="true"
191+
(onSuccess)="handleUploadSuccess($event)" (onError)="handleUploadError($event)"></ik-upload>
191192
```
192193

193194
`ik-upload` component accepts all the parameters supported by the [ImageKit Upload API](https://docs.imagekit.io/api-reference/upload-file-api/client-side-file-upload#request-structure-multipart-form-data) as attributes e.g. `tags`, `useUniqueFileName`, `folder`, `isPrivateFile`, `customCoordinates` etc.
194195

195196
## Sample application
196-
The `samples` folder contains a fully working sample angular application for angular versions 4, 5, 6, 7, and 8. Every application has a README.md file with full instructions on how to run it locally.
197+
The `samples` folder contains a fully working sample angular application for angular versions 4, 5, 6, 7, 8 and 9. Every application has a README.md file with full instructions on how to run it locally.
197198

198199
## Support
199200

0 commit comments

Comments
 (0)