densen2014 / ZXingBlazor

Using ZXing Scan barcode/QR code in blazor
Apache License 2.0
102 stars 41 forks source link

Error: Could not find 'zxing.start' ('zxing' was undefined) #3

Closed gigimaister closed 3 years ago

gigimaister commented 3 years ago

Hi. This after I added scripts in Index(Blazor WASM) and in _ViewImports.. Any Idea?

densen2014 commented 3 years ago

try run my demo project first

gigimaister commented 3 years ago

Yes..Because I didn't have camera on my pc. Thank you so much Sir. Also, can I change the modal style? And the buttons language?

cyberdarius commented 3 years ago

The import in index.html of js is incorrect:

working one is (ZXing.Blazor) with dot and not (ZXingBlazor)

<script src="_content/ZXing.Blazor/lib/barcodereader/zxing.js"></script>
<script src="_content/ZXing.Blazor/lib/barcodereader/barcode.js"></script>
densen2014 commented 3 years ago

Yes..Because I didn't have camera on my pc. Thank you so much Sir. Also, can I change the modal style? And the buttons language?

You can modify the distribution freely

densen2014 commented 3 years ago

The import in index.html of js is incorrect:

working one is (ZXing.Blazor) with dot and not (ZXingBlazor)

<script src="_content/ZXing.Blazor/lib/barcodereader/zxing.js"></script>
<script src="_content/ZXing.Blazor/lib/barcodereader/barcode.js"></script>

i was added a project with NugetPackage: https://github.com/densen2014/ZXingBlazor/blob/master/demoWithNugetPackage/BlazorApp1/wwwroot/index.html

    <script src="_content/ZXingBlazor/lib/barcodereader/zxing.js"></script>
    <script src="_content/ZXingBlazor/lib/barcodereader/barcode.js"></script>