Skip to content

Commit 8ad292f

Browse files
WEBPDFRD-5859, update readme
1 parent b871a76 commit 8ad292f

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ This integration assumes you have `@Angular/cli` app installed.
5252

5353
### Basic setup
5454

55+
1. Generating and serving an Angular project via a development server
56+
57+
```bash
58+
ng new my-angular-app
59+
cd my-angular-app
60+
```
61+
5562
Let's call the root folder of your exiting project as `AngularJS` and FoxitPDFSDK for Web as SDK.
5663

5764
1. Install the lattest version of `@foxitsoftware/foxit-pdf-sdk-for-web-library`.
@@ -60,8 +67,6 @@ Let's call the root folder of your exiting project as `AngularJS` and FoxitPDFSD
6067
npm i -S @foxitsoftware/foxit-pdf-sdk-for-web-library
6168
```
6269

63-
1. Place the `license-key.js` into `./src/app/pdfviewer`. You can find the license information at `SDK/examples/`
64-
6570
_Inside AngularJS, implement the following:_
6671

6772
1. In the `angular.json`, update `architect/build` options of `assets`,`styles` and `extractCss`, and `architect/lint` section.
@@ -76,7 +81,7 @@ _Inside AngularJS, implement the following:_
7681
"glob": "**/*",
7782
"input": "node_modules/@foxitsoftware/foxit-pdf-sdk-for-web-library/lib",
7883
"output": "/foxit-lib",
79-
"ignore": ["PDFViewCtrl.*", "UIExtension.*"]
84+
"ignore": ["PDFViewCtrl.js", "PDFViewCtrl.{vendor,polyfills}.js", "UIExtension.*"]
8085
}
8186
],
8287
"styles": [
@@ -89,6 +94,13 @@ _Inside AngularJS, implement the following:_
8994
}
9095
```
9196

97+
> **NOTE:**
98+
> https://angular.io/cli/build
99+
>
100+
>--extract-css
101+
>
102+
>Deprecated: Deprecated since version 11.0. No longer required to disable CSS extraction for HMR. Extract CSS from global styles into '.css' files instead of '.js'.
103+
92104
### Creating components
93105

94106
1. In AngularJS, run
@@ -99,9 +111,9 @@ _Inside AngularJS, implement the following:_
99111

100112
This step will create `pdfviewer`folder and related component files under `AngularJS/src/app`. Now, you need to implement the followings in `AngularJS/src/app/`.
101113

102-
1. Place the `license-key.js` into `../pdfviewer/`. You can find the license information at `SDK/examples/`.
103-
1. Update `../pdfviewer/component.ts`. For configuration details, refer to the counterpart file inside SDK.
104-
1. Update `../component.html` to pass a DOM element for placing web viewer.
114+
1. Place the `license-key.js` into `src/app/pdfviewer/`. You can find the license information at `SDK/examples/`.
115+
1. Update `src/app/pdfviewer/component.ts`. For configuration details, refer to the counterpart file inside SDK.
116+
1. Update `src/app/app.component.html` to pass a DOM element for placing web viewer.
105117

106118
```html
107119
<div>
@@ -179,7 +191,7 @@ This method was used by default in the out-of-the-box example for Anguar.
179191

180192
This way will automatically merge addons once `npm start` is successfully executed.
181193

182-
4. The import method can be seen at `/integrations/angular/src/app/pdfviewer/pdfviewer.component.ts`.
194+
4. The import method can be seen at `src/app/pdfviewer/pdfviewer.component.ts`.
183195

184196
#### 3. Reference allInOne.js
185197

0 commit comments

Comments
 (0)