This is the
legacyversion of the Angular SDK (
cloudinary_angular
v1.x).
For details on migrating to the current version of the SDK (frontend-frameworks
v1.x + js-url-gen
v1.x), see the Angular SDK migration guide.
Cloudinary's Angular SDK provides simple, yet comprehensive image and video upload, transformation, optimization, and delivery capabilities that you can implement using code that integrates seamlessly with your existing Angular application.
Supported versionsCloudinary's Angular support includes separate libraries for integration with AngularJS (also known as Angular 1.x) and with Angular versions 2.x and later (supported versions: 2.x-13.x).
Quick exampleTake a look at the following transformation code and the image it delivers:
This relatively simple code performs all of the following on the original front_face.jpg image before delivering it:
And here's the URL that would be included in the image tag that's automatically generated from the above code:
In a similar way, you can transform a video.
Angular SDK featuresThis section includes installation and setup instructions for:
AngularJS (version 1.x)The Cloudinary Angular SDK serves as a layer on top of Cloudinary's JavaScript (cloudinary-core
) library. Angular 1.x support is provided through the bower package manager:
This command installs AngularJS (if not already installed), the Cloudinary JavaScript SDK - cloudinary-core
(legacy SDK), and the Cloudinary AngularJS 1.x SDK.
The optional --save
parameter saves the dependency in your bower.json
file.
To use the Cloudinary AngularJS library, you have to configure at least your cloud_name
. You can additionally define a number of optional configuration parameters if relevant.
Most functionality implemented on the client side does not require authentication, so only your cloud_name
is required to be configured, and not your API key or secret. Your API secret should never be exposed on the client side, so if you want to use signed uploads or generate delivery signatures, you'll also need server-side code, for which you can use one of our backend SDKs.
For example:
Angular 2.x and later 1. Install the JavaScript SDK and the Angular SDK for the relevant Angular versionThe Cloudinary Angular SDKs serve as a layer on top of Cloudinary's JavaScript cloudinary-core
(legacy) library. Install the Cloudinary JavaScript library and the relevant version of the Angular SDK in the format:
<version>: Install the Cloudinary Angular SDK package that supports the Angular version you are using:
2.x
4.x
5.x
. For example:@cloudinary/angular
with no version specified, the support for Angular 2.x is installed.ng2-file-upload
or ng-file-upload
to upload your assets and to install only the cloudinary-core
JavaScript library.cloudinary-jquery-file-upload
package instead.For details, see Angular image and video upload
2. Configure your bundler to work with the Cloudinary Angular SDKFor some bundlers, you need to edit certain files to integrate with the Cloudinary Angular (2.x or later) library.
For SystemJS:In your systemjs.config.js
file, add the cloudinary configuration to the map
and packages
sections. In the map
section, make sure to specify the correct version for the Angular version you are using. In the example below, angular-5.x is specified.
In rollup-config.js
, under the plugins
field, add:
Add the relevant Cloudinary imports and specify your cloud_name
and any other required configuration parameters. Make sure to specify the correct version for the Angular version you are using. In the example below, angular-5.x is specified.
And
Set Cloudinary configuration parametersIn the imports or providers section of your app.module.ts
(as relevant for your bundler), you must configure at least your cloud_name
. You can additionally define a number of optional configuration parameters if relevant. You can find your Cloud name in the Dashboard of the Cloudinary Console, and you can find all of your credentials, including API Key and API Secret, on the API Keys page of the Cloudinary Console Settings.
cloud_name
is required to be configured, and not your API key or secret. Your API secret should never be exposed on the client side, so if you want to use signed uploads or generate delivery signatures, you'll also need server-side code, for which you can use one of our backend SDKs.secure
configuration parameter is false
. However, for most modern applications, it's recommended to configure the secure
parameter to true
to ensure that your transformation URLs are always generated as HTTPS.For example:
Using core Cloudinary JavaScript featuresThe JavaScript cloudinary-core (legacy) library is the foundation library underlying this version of Cloudinary's Angular SDK. You can access any of the core JavaScript functionality within your Angular code after importing the core library. For example:
Sample projectsThe Angular SDKs provide a set of sample projects that can help you get started with your own.
Samples for AngularJS (version 1) Samples for Angular (version 2 or later)The following samples link to the master branch of the sample apps. Parallel examples are available for all earlier supported versions of Angular as well.
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