Looking for the old docs site? You can still view it for a limited time here.

formatAsCssName

Description

Renders a string in a friendly name for CSS.

Usage

In HTML Template Binding

{{ formatAsCssName_expression | formatAsCssName }}

In JavaScript

$filter('formatAsCssName')(string)

Parameters

Param Type Details
string string

The string to format.

Example

Source



Demo