Coder Social home page Coder Social logo

Comments (10)

mpgo13 avatar mpgo13 commented on June 24, 2024 2

Ran into the same issue with Angular 8 today.

Steps to reproduce:

  1. Clone https://github.com/mpgo13/angular8-angularx-qrcode
  2. Run ng build
  3. Run cd dist/angular8 && python -m SimpleHTTPServer
  4. Browse to http://localhost:8000

Expected Result:

  • QRCode visible

Actual Result:

Note: Not reproducable with angular's dev server (ng serve)

from angularx-qrcode.

Cordobo avatar Cordobo commented on June 24, 2024 1

Hi @mpgo13, thanks for your sample Repo, I have a look into it.

from angularx-qrcode.

Cordobo avatar Cordobo commented on June 24, 2024 1

A temporary workaround is to set the target in your tsconfig.json from es2015 to es5:

"target": "es5"

Source: angular/angular#30759 (comment)

from angularx-qrcode.

 avatar commented on June 24, 2024 1

Hi @Cordobo, I've had this error and when searching the topic I ran into an interesting article:
Github article

Don't know if you've seen it but hope this helps you find a solution.

from angularx-qrcode.

Cordobo avatar Cordobo commented on June 24, 2024

Could you please provide a stripped down sample repo?

from angularx-qrcode.

stale avatar stale commented on June 24, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from angularx-qrcode.

mpgo13 avatar mpgo13 commented on June 24, 2024

Seems like qrcode.js gets loaded in strict mode. I opened an issue: angular/angular#30759

from angularx-qrcode.

Cordobo avatar Cordobo commented on June 24, 2024

Hi @mpgo13 thanks for your minimal repo, I get this fixed as soon as possible.

from angularx-qrcode.

stale avatar stale commented on June 24, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from angularx-qrcode.

Yorer avatar Yorer commented on June 24, 2024

I've updated my tsconfig.json, this is working for me:
"target": "es5"

I've used es2015 before.

from angularx-qrcode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.