JavaScript 11

[Hybrid/Ionic]Windows Platform에서 alert 객체 대체

Windows 플랫폼에서 alert 객체가 지원되지 않아서 Ionic Popup객체로 대체... var alert = window.alert; angular.module('myApp', ['ionic']).controller('myCtrl', function ($scope, $state, $timeout,$ionicPopup) { alert = function (messageText, titleText) { if (!titleText || titleText == "undefined") { titleText = ""; } var alertPopup = $ionicPopup.alert({ title: titleText, template: messageText }); alertPopup.then(functio..

Language/Mobile 2016.11.04

[Hybrid/Ionic]Windows Platform일 ng-click 이벤트 관련 더블클릭 방지

출처 : https://github.com/driftyco/ionic/issues/2885 window.addEventListener('click', function(event) { if (Object.prototype.toString.call(event) == '[object PointerEvent]') { event.stopPropagation(); } } , true); 또는 ionic.Platform.isIE = function () { return ionic.Platform.ua.toLowerCase().indexOf('trident') > -1; }if (ionic.Platform.isIE()) { angular.module('ionic') .factory('$ionicNgClick', ['$..

Language/Mobile 2016.11.04

[Javascript/JSON] JSON을 이용 시 유용한 Library

XML to JSON – a converter http://thomasfrank.se/xml_to_json.html Session variables without cookies Browser 페이지 별로 저장하는 방식 Browser별 저장 가능 용량 제한(IE7 이상 10M / 자세한 내용은 사이트 본문 참고 바람) http://thomasfrank.se/sessionvars.html JSON Query Engine 참고 : JSON Query Engine Top5 : http://frends.kr/post/json-query-engine-top5/ SQLike : http://thomasfrank.se/sqlike.html JSLinq : http://jsinq.codeplex.com/ 상기 Libar..