🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

angular-linky

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-linky

Angular pipe to find links in text input and turn them into html links

1.2.2
latest
Source
npm
Version published
Weekly downloads
776
-12.42%
Maintainers
1
Weekly downloads
 
Created
Source

angular2-linky

Build Status Dependency Status npm version

Angular pipe to find links in text input and turn them into html links. It was called the same "linky" in ngSanitize module of AngularJs (first). Since Angular 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!

AoT ready.

Installation

npm install --save angular-linky

Import LinkyModule or manually declare LinkyPipe in your app module.

import { LinkyModule } from 'angular-linky';

@NgModule({
  imports: [
    LinkyModule
  ]
})
class YourAppModule {}

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

Keywords

angular

FAQs

Package last updated on 16 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts