ngx-linkifyjs icon indicating copy to clipboard operation
ngx-linkifyjs copied to clipboard

Lazy load linkify service

Open gogoout opened this issue 5 years ago • 1 comments

Hi there, Just changed NgxLinkifyjsService using the new syntax providedIn:root. So that the module can be lazyloaded with below config.

import { NgxLinkifyjsConfigToken } from 'ngx-linkifyjs';
@NgModule({
  declarations: [AppComponent, ...],
  imports: [...],
  providers:[
    {
      provide: NgxLinkifyjsConfigToken,
      useValue: {enableHash: true, enableMention: true}
    },
  ],
  bootstrap: [AppComponent]
})
export class AppModule {
}

The only thing worth mention is that the test failed because of this error

TypeError: hashtag_1.default is not a function

This should be some kind of typescript error because the test project is working fine.

gogoout avatar Dec 12 '19 03:12 gogoout

@AnthonyNahas Please let me know if there is anything you need me to change.

gogoout avatar Dec 20 '19 01:12 gogoout