Last updated: Apr-23-2025
This quick start lets you get an end-to-end implementation up and running using the Angular SDK in 5 minutes or less.
Prerequisites 1. Set up and configure the SDK Install the packagesInstall the required packages using the NPM package manager:
Configure CloudinaryCreate a basic Angular app, and in app.component.ts import the CloudinaryModule
:
If you're not using standalone components, then you'll need to import the
CloudinaryModule
in
app.module.tsinstead.
Then, in app.component.ts, import the Cloudinary classes, create a Cloudinary instance and set your cloud name:
app.component.ts (continued)
2. Upload an imageIf you changed the cloud name in the previous step to your own, you need to use an image that's stored in your Cloudinary product environment for the next steps. All new accounts come with sample images, so you can use one of those, or, if you want to use the same image as us, save this image locally, then upload it to Cloudinary.
For convenience, the instruction below shows you how to manually upload files in the Cloudinary console UI, but as a developer, you'll probably be interested in uploading files programmatically. There are several ways to do this in client-side only applications, as explained in
Angular SDK image and video uploador you can use the
CLI.
For the purposes of this quick start, the quickest way to upload a single image is as follows:
In the next step, you'll need the public ID of whichever image you use (in our case, we set the public ID on upload to docs/models
). If using one of the sample images, double click the asset to open the Manage page, navigate to the Summary tab, and copy the Public ID:
If your product environment uses the legacy
fixed folder mode, you won't see the public ID at the bottom of the
Summarytab. Instead, it's located at the top left corner of the Manage page.
3. Transform and deliver the imageCopy and paste this import statement below the existing ones:
app.component.ts (continued)
Copy and paste the following code in the ngOnInit
function, under the configuration code:
app.component.ts (continued)
If you're using an image with a public ID other than
docs/models
, make sure to update your code with the public ID of the image you're delivering.
Copy and paste the following code into app.component.html:
4. Run your codeRun the code to see the transformed image.
View the completed codeHere's the full example:
This code is also available in GitHub.
@cloudinary/url-gen
.@cloudinary/url-gen
.âï¸ Feedback sent!
âï¸Â  ErrorUnfortunately there's been an error sending your feedback.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4