Angularjs + ionic + 'h5 + 'implements QR code scanning. angularjsionic
I would like to share with you todayAngularjs and ionicThe Framework supports QR code scanning on mobile phones. Cordova and Other plug-ins are not used, implemented by h5 +.
Development Tool: hbuilder
First, you need to introduce the "Barcode" configuration in the configuration file under the hbuilder project. The specific steps are as follows:
1. Find the "manifest. json" fil
Problem description and Solutions:http://blog.ionic.io/ios-9-potential-breaking-change/If the following problem occurs in the browser, it is recommended to make a patch:Error: [$rootScope: Infdig] $digest () iterations reached. aborting! Watchers fired in the last 5 iterations: []Program translation:Download patches:https://gist.githubusercontent.com/IgorMinar/863acd413e3925bf282c/raw/58efa6bad10af41761e866084cb34bca28c7aa9d /angular-ios9-uiwebview.patch.jsTo apply the module in App.js (Start JS
Ionic Bulid AndroidIonic Build--release AndroidKeytool-genkey-v-keystore demo.keystore-alias demo.keystore-keyalg rsa-validity 20000Jarsigner-verbose-keystore/yourpath/demo.keystore-signedjar demo_signed.apk demo.apk Demo.keystoreZipalign-v 4 your_project_name-unaligned.apk your_project_name.apkSigning Your App ManuallyYou don't need Android Studio to the sign your app. You can sign your app from the command line using standard tools from the Android
The event invocation of the Ionicview lifecycle uses $scope in each Ionicview controller. $on (' $ionicView. Enter ', function () {});1.$ ionicview.loaded that view has been loaded. This event is created and added to the DOM only once per time. If the view is left, but is cached, then this event will no longer be viewed in subsequent shots.Loading the event is a good place to put your setup code into view; However, it is not recommended to listen to the event when the diagram becomes active.A On
Ionic package project, run the error A problem occurred refreshing root project 'android'..., ionicconfiguring
The error message returned when the sdk is not downloaded completely.
Solution:
1. Open the sdk manage. Download the three sdk packages: android support repository, Google play services, and google repository. Of course, the latest package also needs to be downloaded.
Download three of the Extras.
2. Open the sdk manage and selec
the card is presented. Started using the list card element and used the Item-avatar, item-body element for displaying picture and text information, using the Item-divider class at the bottom.Divclass= "List Card"> Divclass= "Item Item-avatar"> imgsrc= "Mcfly.jpg"> H2>Marty McFlyH2> P>November 05, 1955P> Div> Divclass= "Item Item-body"> imgclass= "Full-image"src= "Delorean.jpg"> P>App Rapid development-Learn not only the technology, update the dream! BR>App Rapid development-Le
The development of the application process need to sub-page tabs hidden, on-line to find more than n programs, degrees Niang out are written instructions,But the bug in the test was obvious, so Google outside the wall. Finally found the perfect method, as follows tabs.htmlController.. Controller (' Tabsctrl ', function ($scope, $rootScope, $state) {$rootScope. $on (' $ionicView. Beforeenter ', function () {var statename = $state. The main page that exists in Current.name;//tabs does not need to
1. Get data instance asynchronously in serviceAngular.module (' starter.services ', []). Factory (' Chats ',function($http, $q) {//define service for chats return{all:function() {//The all method gets the data asynchronously varDeferred= $q. Defer ();//Define deferred varPromise=deferred.promise;//Define Promise$http. Get (' http://localhost:3000/lists '). Success (function(data,status,headers,config) {//executes the Deferred.resolve method, passing in the returned data as a parameter
filtered list:
D3
Google Chart
Chartjs
Chartistjs
N3-charts
Zing Chart
High Charts
Fusion Chart
Amchart
Echarts
Authorization type
Bsd
Apache 2.0
MIT
MIT
Bsd
Commercial Licensing
Commercial Licensing
Commercial Licensing
Commercial Licensing
Bsd
Supported languages
Original JS
Original JS
Original JS
Original JS
Angular JS
Original JS
Original JS
1. AngularJS external controllers (DOM events, external callback functions such as jQuery UI space, etc.) call the AngularJS function, you must call $apply. In this case, you need to command AngularJS to refresh itself (model, view, etc.), $apply isUsed to do this thing.code example:1 varApp = Angular.module ("myApp", []);2App.controller (' Firstcontroller ',function($scope) {3$scope. Name = ' Hello ';4SetTimeout (function(){5 //$scope. Name = ' Hi ';6$scope. $apply (function()
) { $ionicTabsDelegate._instances[1].select(index); }; $scope.$on(‘$ionicView.afterEnter‘, function () { $ionicTabsDelegate._instances[1].select($ionicSlideBoxDelegate.currentIndex()); }); $scope.selectedTab = function (index) { //滑动的索引和速度 $ionicSlideBoxDelegate.slide(index) }})4. Code InterpretationThe menu section above uses the tab build, the middle part of the list uses Slidebox, there is no nesting, just to do some processing at the time of their choice.
Tab1servic
We can create the service in config again, or create it directly in module, use provider to create the This.get () anonymous function, and factory can return the string or object directly, and suggest to return based on the object.So it won't be too messy, and of course there's a better, more intuitive way to create it.The above case introduces an external JS, which is dedicated to defining various services/** * Created by Administrator on 2016/3/28. */var service=angular.module (' MyService ',
1, the use of Angularjs to bring their own $cachefactory services$cacheFactory literal literal translation is the cache factory, which can be used to generate cache objects, cache objects in a key-value way of data storageIn the entire application is a singleton, you can inject the service or controller, and then you can use it to freely access objects and various variables, here is a simple examplefunction ($scope, $ionicModal, $timeout, $cacheFactory) { var user = {name: ' Jax ', age:18,
(' Goodslistctrl ', Goodslistctrl);Goodslistctrl. $inject = [' $scope ', ' $state ', ' Service ', ' $stateParams ', ' $localStorage ', ' $ionicSlideBoxDelegate ', ' $ Ionicpopup '];function Goodslistctrl ($scope, $state, Service, $stateParams, $localStorage, $ionicSlideBoxDelegate, $ionicPopup) {var vm = this;............}})();Third, the use of $ionicslideboxdelegate.loop (true) there will be a problem that has not been thought to understand: loading two pictures will show four, that is, the tw
See: Http://ionicframework.com/docs/css/components Code One: www/index.html Code two: Www/css/style.css/* Empty. Add your own CSS if you like */h2.story-title { white-space:normal; Height:3.6em;}After setting 3.6em. The title bar will probably occupy a height of three rows, so that the domain line is closer to the bottom and looks more beautiful.Ionic List Component Basic usage Where the picture can be set to Item-avatar-left or Item-thumbnail-left
text-overflow: ellipsis;
Hybrid development of mobile apps, to achieve is to initialize the page does not show the search box, so that the page moves up a certain displacement.can be achieved.JS can also be used to achieve:var cont = document.getElementsByTagName ("ion-content") [0];var start_top = 53;var end_top = 88;var slideshow = function (obj,start,end) {var start_top = $ (obj). Offset (). Top;Obj.addeventlistener (' Touchstart ', function (event) {Event.preventdefault ();if (event.targetTouches.length = = 1) {var
Ionic as an application, certainly and the server has data exchange, decentralized processing API is too cumbersome, so the general use of interceptors to focus on processing. Mainly by the following aspects of the application:
Server Address Injection
Error Handling
Token injection
Log Processing
Skip to login page when no token
...
There are four ways of Request:function (config) requesterror:function (config) res
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.