This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.factory('$localstorage', ['$window', function($window) { | |
return { | |
set: function(key, value) { | |
$window.localStorage[key] = value; | |
}, | |
get: function(key, defaultValue) { | |
return $window.localStorage[key] || false; | |
}, | |
setObject: function(key, value) { | |
$window.localStorage[key] = JSON.stringify(value); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//app.js | |
.run(function($ionicPlatform, $notification, androidConfig, iosConfig) { | |
$ionicPlatform.ready(function() { | |
if( ionic.Platform.isWebView() ){ | |
var push = $window.PushNotification.init({ | |
"android": androidConfig, | |
"ios": iosConfig, | |
"windows": {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
'use strict'; | |
angular | |
.module('ad-utils') | |
.factory('SearchHelper', Search); | |
function Search($log, $filter){ | |
var service = { | |
string: searchStrInObj |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UK NUMBERS | |
$scope.phoneRegex = /^(\s*(\s*^\+44\s*)|^(\s*4{2})|(\s*^0{2}4{2}\s*)|(\s*^0)\s*|)(\s*[123456789]\s*)(\s*\d\s*){8,9}\s*$\s*/; | |
//WARNING This regex will accept only UK numers (+447, 07) | |
$scope.phoneRegex = /^(\s*(\s*^\+44\s*)|^(\s*4{2})|(\s*^0{2}4{2}\s*)|(\s*^0)\s*|)(\s*[7]\s*)(\s*\d\s*){9}\s*$\s*/; | |
//Generic phone number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var doc = new $window.jsPDF("p", "mm", "a4"); | |
$timeout(function(){ | |
$window.html2canvas( $document[0].getElementsByClassName('print-pass'), { | |
onrendered: function(canvas){ | |
var imgData = canvas.toDataURL('image/png'); | |
//Page size in mm | |
var pageHeight = 295; | |
var imgWidth = 210; | |
var imgHeight = canvas.height * imgWidth / canvas.width; | |
var heightLeft = imgHeight; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
'use strict'; | |
angular | |
.module('app') | |
.directive('hideTabs', function($rootScope) { | |
return { | |
restrict: 'A', | |
link: function($scope, $el) { | |
$rootScope.hideTabs = 'tabs-item-hide'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
// Find all YouTube videos | |
var $allVideos = $(".video_responsive"), | |
// The element that is fluid width | |
$fluidEl = $("body"); | |
// Figure out and save aspect ratio for each video | |
$allVideos.each(function() { | |
$(this) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
'use strict'; | |
angular | |
.module('adutils.ui') | |
.directive('counterSelector', function() { | |
return { | |
restrict: 'E', | |
replace: true, | |
template: '<div><div class=row><button class="button button-outline col-20 f50 secondary ion-minus-circled"ng-click=sub()></button><div class=col><div style=font-size:74px;padding:10px;font-weight:bolder>{{valLabel}}</div></div><button class="button button-outline col-20 f50 secondary ion-plus-circled"ng-click=plus()></button></div><h4 class="onb-subtitle tcenter">years of experience</h4></div>', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
'use strict'; | |
angular | |
.module('starter') | |
.factory('$openAmat', openAmat); | |
function openAmat($log, $http, $q){ | |
var service = { | |
nearBy: nearBy, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internals/webpack/webpack.base.babel.js | |
- publicPath: '/', | |
+ publicPath: '/subfolder/', | |
File internals/webpack/webpack.prod.babel.js | |
- publicPath: '/', | |
+ publicPath: '/subfolder/', | |
app/app.js |
OlderNewer