@@ -23,15 +23,8 @@ npm install
2323Open ` src/app/app.module.ts ` and update the ImageKit configuration with your credentials:
2424
2525``` typescript
26- ImagekitioAngularModule .forRoot ({
27- publicKey: ' your_public_key_here' ,
26+ ImagekitAngularModule .forRoot ({
2827 urlEndpoint: ' https://ik.imagekit.io/your_imagekit_id' ,
29- authenticator : async () => {
30- // Replace with your backend authentication endpoint
31- const response = await fetch (' http://localhost:3000/auth' );
32- const data = await response .json ();
33- return { signature: data .signature , expire: data .expire , token: data .token };
34- }
3528})
3629```
3730
@@ -53,9 +46,7 @@ const app = express();
5346app .use (cors ());
5447
5548const imagekit = new ImageKit ({
56- publicKey: ' your_public_key' ,
5749 privateKey: ' your_private_key' ,
58- urlEndpoint: ' https://ik.imagekit.io/your_imagekit_id'
5950});
6051
6152app .get (' /auth' , (req , res ) => {
@@ -88,7 +79,6 @@ This demo app showcases the following ImageKit Angular SDK features:
8879
89801 . ** Basic Image Rendering** - Simple image display with transformations
90812 . ** Lazy Loading** - Images that load only when they enter the viewport
91- 3 . ** LQIP (Low Quality Image Placeholder)** - Progressive image loading with blur effect
92824 . ** Responsive Images** - Automatic srcset generation for different screen sizes
93835 . ** Chained Transformations** - Multiple transformations applied in sequence
94846 . ** Video Component** - Video rendering with transformations
@@ -136,7 +126,7 @@ async uploadFile(file: File) {
136126 const result = await upload ({
137127 file: file ,
138128 fileName: file .name ,
139- publicKey: ' your_public_key ' ,
129+ publicKey: authData . publicKey ,
140130 signature: authData .signature ,
141131 expire: authData .expire ,
142132 token: authData .token ,
@@ -172,32 +162,14 @@ Common transformations you can apply:
172162
173163If you make changes to the SDK and want to test them:
174164
175- 1 . Navigate to the SDK directory:
176- ``` bash
177- cd ../sdk
178- ```
165+ 1 . Make changes in the sdk
179166
180- 2 . Build the SDK:
181- ``` bash
182- npm run build
183- ```
184-
185- 3 . Create a tarball from the dist directory:
186- ``` bash
187- cd dist/imagekit-angular
188- npm pack
189- ```
190-
191- 4 . Install the updated package in the test app:
192- ``` bash
193- cd ../../../test-app
194- npm install ../sdk/dist/imagekit-angular/imagekit-angular-6.0.0.tgz
195- ```
167+ 2 . Run ` ./install_sdk.sh `
196168
197169## Running Tests
198170
199171``` bash
200- npm test
172+ npm run e2e
201173```
202174
203175## Building for Production
0 commit comments