AngularSDK

Description

This is our Angular SDK. The objective of this library is to render images as is or with our plugins

Examples

Please note that the order of the plugins is important. See home for more details.

// In your app.module.ts inject the library
			import { AngularLibraryModule} from '@cloudinary/angular';
			
			imports: [
			  ...,
			  AngularLibraryModule,
			],
			
			// In your component.ts use `@cloudinary/base` to generate your transformations
			// Import the plugins you wish to use
			
			import {CloudinaryImage} from "@cloudinary/base/assets/CloudinaryImage";
			import {
			 CldImg,
			 accessibility,
			 responsive,
			 lazyload,
			 placeholder
			} from '@cloudinary/angular';
			
			ngOnInit() {
			  this.img = new CloudinaryImage().setConfig({
			      cloud: {
			        cloudName: 'demo'
			      }
			    })
			    .setPublicID('sample');
			
			  this.plugins = [lazyload(), placeholder()]
			}
			
			// In your view add the component with your transformation
			<cld-img [transformation]="this.img" [plugins]="this.plugins"></cld-img>