Ticket T652211
Visible to All Users

Unable to integrate Document Viewer with Angular 6.0.7

created 7 years ago (modified 7 years ago)

I am unable to integrate Document Viewer with my Angular 6.0.7 application. Complete project configuration is as followes:
Angular CLI: 6.0.8
Node: 8.9.4
OS: win32 x64
Angular: 6.0.7

I followed the steps mentioned here (Document Viewer Integration in Angular 2):

https://documentation.devexpress.com/XtraReports/119430/Creating-End-User-Reporting-Applications/Web-Reporting/Using-Reporting-Controls-in-JS/Document-Viewer-Integration-in-Angular2

Step 8 states that I have to edit the file webpack.config.js to add alias for certain modules. But Angular 6 does not expose webpack.config.js

I tried creating a custom webpack.config.js and added the alias, as per the documentation, but it's not working.

I need your assistance in integrating Document Viewer with Angular 6.0.7.

Thank you !!

Comments (1)

    I've atached the project for your reference

    Answers approved by DevExpress Support

    created 7 years ago (modified 7 years ago)

    Hi Ishan,

    The bug reported in the Can't get Globalize to work inside an Angular CLI project thread was fixed in Angular CLI 6, so now it is not necessary to call the ng eject command and use the webpack.config file for the Globalize library registration. Just add the following code to the tsconfig.jsonfile to make the Globalize library work in your project:

    JavaScript
    "paths": { "globalize": [ "node_modules/globalize/dist/globalize" ], "globalize/*": [ "node_modules/globalize/dist/globalize/*" ], "cldr": [ "node_modules/cldrjs/dist/cldr" ], "cldr/*": [ "node_modules/cldrjs/dist/cldr/*" ] }

    In the attachment, you can find a sample project that demonstrates this approach in action. Let us know whether this approach works for you.

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.