angular_barcode 0.1.0 copy "angular_barcode: ^0.1.0" to clipboard
angular_barcode: ^0.1.0 copied to clipboard

Draw Barcode and QrCode with Angular 2

example/main.dart

/// Copyright (c) 2016, lejard_h. All rights reserved. Use of this source code
/// is governed by a BSD-style license that can be found in the LICENSE file.
library angular_barcode_main;

import 'dart:async';

import 'package:angular/angular.dart';
import 'package:angular_barcode/angular_barcode.dart';

import 'main.template.dart' as ng;

void main() {
  runApp(ng.AppComponentNgFactory);
}

@Component(
  selector: "app",
  template: '''
    <angular-barcode #barcode value="1234567890128" [displayValue]="true" format="ean13" [width]="width"></angular-barcode>
    <angular-qrcode data="1234567890128" size="200" color="0000ff"></angular-qrcode>
  ''',
  directives: [angularBarcodeDirectives],
)
class AppComponent implements OnInit {
  num width = 2;

  @ViewChild("barcode")
  AngularBarcode barcode;

  @override
  ngOnInit() {
    Timer(const Duration(seconds: 2), () {
      width = 5;
      barcode.height = 200;
    });
  }
}
0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

Draw Barcode and QrCode with Angular 2

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

angular, dart_barcode

More

Packages that depend on angular_barcode