martijnpieters / angular2-linky

Linky pipe for angular2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

angular2-linky

Build Status Dependency Status

Angular2 pipe to find links in text input and turn them into html links. It was called the same "linky" in ngSanitize module of Angular1. Since Angular2 does not have such pipe built in therefore this repo was created.

This is just a wrapper for Autolinker.js so all issues and feature requests related to autolinker should go to their issues!

Installation

npm install --save angular2-linky

Usage

Use linky pipe with [innerHTML] (or outerHTML, depends on you) binding to get HTML correctly rendered:

<span [innerHTML]="yourText | linky"></span>

You can pass any autolinker option as a second pipe argument. For ex.:

<span [innerHTML]="myText | linky:{newWindow: false}"></span>

License

MIT

About

Linky pipe for angular2

License:MIT License


Languages

Language:TypeScript 59.6%Language:JavaScript 40.4%