View source Improve this doc

linky
filter in module ngSanitize

Description

Finds links in text input and turns them into html links. Supports http/https/ftp/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)

Parameters

ParamTypeDetails
textstring

Input text.

targetstring

Window (_blank|_self|_parent|_top) or named frame to open links in.

Returns

string

Html-linkified text.

Example

Source







Demo