ionic/angular: Implement A Barcode Scanner Using Ionic Framework


Source: https://blog.nraboy.com/2014/09/implement-barcode-scanner-using-ionic-framework/ More specifically I needed to scan quick response (QR) codes.  After doing some searching I found that ngCordova had an extension for the Apache Cordova plugin BarcodeScanner which has the ability to scan barcodes in the following formats: QR Code Data Matrix UPC E UPC A EAN 8 EAN 13 Code 128 Code… Read More ionic/angular: Implement A Barcode Scanner Using Ionic Framework

ionic/angular: Create, Delete, And Search Contacts In Ionic Framework


Source: https://blog.nraboy.com/2014/11/create-delete-search-contacts-ionic-framework/ When you make an app or service, you may find your self wanting to strengthen the user experience by connecting with friends in some fashion.  Applications like Facebook and Twitter allow you to search your contact book for friends that are already using their service.  If your friend isn’t using the service, you… Read More ionic/angular: Create, Delete, And Search Contacts In Ionic Framework

angular- Stop event propogation


simple angularjs way – ng-click=”UpdateResponderStatus(item, status.id); $event.stopPropagation();” directive way – .directive(‘stopEvent’, function () { return { restrict: ‘A’, link: function (scope, element, attr) { element.bind(attr.stopEvent, function (e) { e.stopPropagation(); }); } }; }); that could be used this way: Happy Coding.. 🙂

How to set value property in angularjs ng-options?


  http://docs.angularjs.org/api/ng.directive:select ngOptions(optional) – {comprehension_expression=} – in one of the following forms: for array data sources:label for value in arrayselect as label for value in arraylabel group by group for value in arrayselect as label group by group for value in arrayfor object data sources:label for (key , value) in objectselect as label for (key… Read More How to set value property in angularjs ng-options?

required field Label–Angularjs Directive


So I thought to make some kind of custom <label> where I have mark showing that this field is required along with label text…. In angular, we can take advantage of making directives for this kind of custom control, so I did something like below – HTML <required-label label=”First Name”></required-label> app.JS  (Angular Directive) appRoot.directive(‘requiredLabel’, function… Read More required field Label–Angularjs Directive

angularjs – $apply and $digest


$apply and $digest That step that checks to see if any binding values have changed actually has a method,$scope.$digest(). That’s actually where the magic happens, but we almost never call it directly, instead we use $scope.$apply() which will call $scope.$digest() for you. $scope.$apply() takes a function or an Angular expression string, and executes it, then calls $scope.$digest() to update any bindings or… Read More angularjs – $apply and $digest