Reference
Assets, rich text, links, and error handling for AnalogJS on @localess/angular.
Analog uses @localess/angular unchanged, so everything below works exactly as in Angular. Each section links to the full Angular reference.
Assets
Resolve assets with the llAsset pipe or LocalessAssetService.link(), passing transform parameters as a second argument:
<img [src]="data.image | llAsset: { w: 800, f: 'avif' }" [alt]="data.imageAlt" />| Param | Type | Description |
|---|---|---|
w | number | Target width in pixels — whole number, 1–8192. Never upscales: a width above the source redirects to the source width |
h | number | Target height in pixels — same rules as w. Combined with w, the result is governed by fit |
fit | 'cover' | 'contain' | 'inside' | 'outside' | 'fill' | How the image fills the box when both w and h are set (default cover) |
q | number | Output quality, whole number 1–100. Defaults per format: JPEG and WebP 80, AVIF 50 |
f | 'webp' | 'jpeg' | 'png' | 'avif' | Converts the output format. Without it, the stored format is kept |
thumbnail | boolean | Extracts the first frame of an animated/video asset before resizing |
An out-of-range or fractional w, h or q throws a TypeError before the URL is built. For the untouched uploaded file, or to force a browser download, use the original and download links described below rather than a transform parameter.
For the untouched file or a download link, use LocalessAssetService.originalLink() and downloadLink(). provideLocaless() also registers Angular's IMAGE_LOADER, so NgOptimizedImage works with Localess assets. See Asset Service and Angular Image Optimization.
Rich Text
Render a rich text field with <ll-rich-text [content]="data.content" />, or the llRichText pipe for an HTML string — see <ll-rich-text>.
Links
Resolve a link field with the llLink pipe against the links map — see llLink.
Error handling
LocalessContentService methods throw LocalessApiError for a non-2xx response. In a route resolver, catch status === 404 and return undefined to render a not-found state, and rethrow everything else — see the Full Example.
API Reference
The full list of services, directives, pipes and types is in the Angular reference.
Visual Editor
Live editing with the Localess Visual Editor in an AnalogJS app — enableSync, ll-document, and sync events.
Getting Started
Angular SDK for Localess — content delivery, rich text rendering, asset management, dynamic component rendering, and Visual Editor integration for client-side and server-side rendered Angular applications.