Viewing PDF on any browser
npm install angular-pdf-viewer
,




View all the directives in action at https://PriyatoshMohapatra.github.io/Angular-PDF-Viewer
Now install angular-pdf-viewer via:
``shell`
npm install --save angular-pdf-viewer
---
##### SystemJS
>Note:If you are using SystemJS, you should adjust your configuration to point to the UMD bundle.map
In your systemjs config file, needs to tell the System loader where to look for angular-pdf-viewer:`js`
map: {
'angular-pdf-viewer': 'node_modules/angular-pdf-viewer/bundles/angular-pdf-viewer.umd.js',
}
---
Once installed you need to import the main module:
`js`
import { LibModule } from 'angular-pdf-viewer'; LibModule .forRoot()
The only remaining part is to list the imported module in your application module. The exact method will be slightly
different for the root (top-level) module for which you should end up with the code similar to (notice ):`js
import { LibModule } from 'angular-pdf-viewer';
@NgModule({
declarations: [AppComponent, ...],
imports: [LibModule.forRoot(), ...],
bootstrap: [AppComponent]
})
export class AppModule {
}
`
Other modules in your application can simply import LibModule :
`js
import { LibModule } from 'angular-pdf-viewer';
@NgModule({
declarations: [OtherComponent, ...],
imports: [LibModule, ...],
})
export class OtherModule {
}
``
Copyright (c) 2018 Priyatosh Mohapatra. Licensed under the MIT License (MIT)