0

I need to generate QR Code For every user in my portal. When they logged in, the QR Code Image will be displayed in Their Profile Page. The QR Code Information Like as follows http://mywebsite.com/my.html?userId=12345678900987654321

How to generate QR Code using AngularJS. If They Scan It directly open into browser. Is it Possible?

2
  • 1
    Well, there are a lot of AngularJS libraries to generate QR Codes... This one or this one, etc. Commented May 10, 2017 at 10:10
  • Off-Topic, please post here softwarerecs.stackexchange.com Commented May 10, 2017 at 10:10

1 Answer 1

1

You will most likely be using AngularJs for that. Check out some JavaScript libraries for that purpose, I found Qrcode.js. On their github page they show how to use it. By the looks of it you will generate a code for a line and user id so samples from their github help:

<div id="qrcode"></div> 
<script type="text/javascript">
    var userId = getUserId(); // get user id somehow
    new QRCode(document.getElementById("qrCodeElement"), "http://mywebsite.com/my.html?userId=" + userId);
</script>

So when you have a HTML element with ID "qrCodeElement" it should show there.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.