Frameworks
Integrations
Mendix
SharePoint
Default UI
Modular UI
AnnotationManager
Annotation Types
Customize
Version 11
Version 10
v10.12
v10.11
v10.10
v10.9
v10.8
v10.7
v10.6
v10.5
v10.4
v10.3
v10.2
v10.1
v10.0
Version 8
v8.12
v8.11
v8.10
v8.9
v8.8
v8.7
v8.6
v8.5
v8.4
v8.3
v8.2
v8.1
v8.0
Version 7
Version 6
v6.3
v6.2
v6.1
v6.0
Version 5
Version 4
Version 3
Version 2
WebViewer Server
WebViewer BIM
This guide will show you how to integrate WebViewer Document Viewer & Editor into an Angular application.
You can watch a step-by-step video to help you get started.
You can also download a ready-to-go sample on GitHub.
If you're looking for an AngularJS / Angular 1.x guide or clone GitHub Sample. Otherwise, continue with the rest of this guide for Angular 2+.
Prior to starting, you should have already installed Node and npm.
Get your Apryse trial key.
Clone the Angular sample by executing
Once cloned, navigate into the webviewer-angular-sample
directory and install all the required dependencies by executing
npm will also download the Apryse WebViewer and extract it to /src/lib
.
Since this is an Angular project, it is important to pay attention to the bundled files and assets. If you take a peek inside the angular.json
file, you'll notice the following lines inside the build
options:
Please make sure that webviewer.min.js
is included in the scripts
and also that the lib
folder containing the webviewer.min.js
file is included in the assets
array so that WebViewer can function properly.
To run the sample, navigate to your webviewer-angular-sample/
directory and execute
Then navigate to http://localhost:4200
. You should see the application load on your browser. Note it will change in real time if you edit any of the source files.
To call more WebViewer API's, navigate to /src/app/app.component.ts
and add the API calls in the callback of the WebViewer constructor(you may need to make one if it is not provided). Add your own license key in place of 'YOUR_LICENSE_KEY'.
If your Angular application is already running, you should see the theme change right away. Otherwise execute npm start
again, then navigate to http://localhost:4200
and you should see that the theme has changed.
This guide will show you how to integrate WebViewer Document Viewer & Editor into an Angular application.
You can watch a step-by-step video to help you get started.
You can also download a ready-to-go sample on GitHub.
If you're looking for an AngularJS / Angular 1.x guide or clone GitHub Sample. Otherwise, continue with the rest of this guide for Angular 2+.
Prior to starting, you should have already installed Node and npm.
From WebViewer.zip
extract the WebViewer
folder to your preferred location
Navigate to your angular project. Let's call the path to your project PROJ_ROOT
:
PROJ_ROOT = path/to/your/angular/project/
Create two new folders:
PROJ_ROOT/src
folder, create a new folder called wv-resources
.PROJ_ROOT/src/app
folder, create a new folder called webviewer
.From the WebViewer
folder you extracted in step 1. copy the lib
folder into PROJ_ROOT/src/wv-resources/
Update the angular.json
file inside your project's root folder at PROJ_ROOT/
to update assets and scripts under the options for build
.
Add your own license key in place of 'YOUR_LICENSE_KEY'.
Inside the PROJ_ROOT/src/app/webviewer/
folder create three new files:
webviewer.component.html
webviewer.component.css
webviewer.component.ts
Inside of app.module.ts
in the PROJ_ROOT/src/app/
folder import webviewer component:
Inside of app.component.html
in the PROJ_ROOT/src/app
folder place <web-viewer>
tag:
You can test that the WebViewer is now part of your application by running the following:
In your browser, go to localhost:4200
to see the WebViewer in action.
Unable to load WebViewer Find out more about possible solutions to errors in loading WebViewer in your angular project.
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales