Improve this Doc View Source linky
From Get docs
< Improve this Doc ngSanitize | filterAngularjs/docs/1.8/api/ngsanitize/filter/linky
Improve this Doc View Source linky
- filter in module ngSanitize
Overview
Finds links in text input and turns them into html links. Supports http/https/ftp/sftp/mailto
and plain email address links.
Requires the ngSanitize module to be installed.
Usage
In HTML Template Binding
<span ng-bind-html="linky_expression | linky"></span>
In JavaScript
$filter('linky')(text, target, attributes)
Arguments
Param | Type | Details |
---|---|---|
text | string
|
Input text. |
target (optional) |
string
|
_self|_parent|_top) or named frame to open links in. |
attributes (optional) |
object function(url)
|
Add custom attributes to the link element. Can be one of:
|
Returns
string
|
Html-linkified and sanitized text. |
Example
© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 3.0.
https://code.angularjs.org/1.8.2/docs/api/ngSanitize/filter/linky