Angular 4+ AutoLinked Component

You can use this component to render urls ,phones ,emails ,hasttags and mentions into clickable links .
First you need to install the library from npm : ` npm install ngx-autolinked --save `
Next
` import the module NgxAutolinkedModule and add it to main module imports import { NgxAutolinkedModule } from 'ngx-autolinked'; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, NgxAutolinkedModule, providers: [], bootstrap: [AppComponent] }) export class AppModule { } `
Then you can easilly use it in any component .For example :
` import { Component } from '@angular/core'; @Component({ selector: 'app-root', template: `

https://www.techiediaries.com

`, styles: [] }) export class AppComponent { } `
This will be rendered to
techiediaries.com
You can pass many options to ngx-autolinked component such as ` newWindow : boolean : Open links in new window urls : boolean : render urls email : boolean : render emails phone : boolean : render phones mention : 'twitter' | 'google' | false : service to use hashtag : 'twitter' | 'facebook' | false : service to use stripPrefix : boolean : string prefixes in urls stripTrailingSlash : boolean : string trailing slash truncate : object : truncate text className : string : add a class name to rendred elements `
For example to render urls ,emails and phones without rendering hashtags and mentions use
`

https://www.techiediaries.com


[email protected]


0 00 00 00 00

@techiediaries

#techiediaries

`