Coder Social home page Coder Social logo

Comments (11)

GianniAzizi avatar GianniAzizi commented on July 22, 2024 6

If you want to hide the title attribute on the QR Code, you just have to add [attr.title]="''" on the component html tag.

from angularx-qrcode.

theshreyansh avatar theshreyansh commented on July 22, 2024 3

google a lot on this, and finally, find below piece of code working,
use > style="pointer-events: none"
Example >

from angularx-qrcode.

Cordobo avatar Cordobo commented on July 22, 2024 1

That's the most pragmatic solution, that's the way to go.

from angularx-qrcode.

theshreyansh avatar theshreyansh commented on July 22, 2024 1

qrcode [qrdata]="angularxQrCode" style="pointer-events: none" [size]="150" [level]="'M'" ></qrcode

from angularx-qrcode.

Cordobo avatar Cordobo commented on July 22, 2024

Hello dhyey35,

and thanks for your report. It's a good enhancement, although I have to hack it into the only dependency of that project:

https://github.com/davidshimjs/qrcodejs/blob/master/qrcode.js#L585

I guess it'll be a rewrite-to-typescript-project for the above mentioned lib, I keep you updated of my progress.

from angularx-qrcode.

dhyey35 avatar dhyey35 commented on July 22, 2024

I think rewrite would be an overkill as the project hasn't been updated since 2015, we can just fork it and add a new option called noTitle in _htOption which would be a boolean on https://github.com/davidshimjs/qrcodejs/blob/master/qrcode.js#L536 and pass it to makeCode from https://github.com/davidshimjs/qrcodejs/blob/master/qrcode.js#L572 than we can have a simple if condition check in makeCode function in https://github.com/davidshimjs/qrcodejs/blob/master/qrcode.js#L585 and just update our qrcodejs2.d.ts and finally point our package.json to our forked version.

What do you think about this ?

from angularx-qrcode.

maksof-Rehan avatar maksof-Rehan commented on July 22, 2024

@GianniAzizi nice tip

from angularx-qrcode.

Yorer avatar Yorer commented on July 22, 2024

[attr.title]="''"

This helped thanks ;)

from angularx-qrcode.

HasithNawana avatar HasithNawana commented on July 22, 2024

google a lot on this, and finally, find below piece of code working,
use > style="pointer-events: none"
Example >

Thanks a lot

from angularx-qrcode.

Junior0909 avatar Junior0909 commented on July 22, 2024

I have to add [attr.title]="''" on the component html tag.But it doesn't work,then try another style="pointer-events: none", it's OK. I think it wasn't the best.

from angularx-qrcode.

eliasdev avatar eliasdev commented on July 22, 2024

I have to add [attr.title]="''" on the component html tag.But it doesn't work,then try another style="pointer-events: none", it's OK. I think it wasn't the best.

But it does the job, I had to go with this one as well.

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.