This file contains 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
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
This file contains 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.factory('EventBus', function() { | |
var EventMap = []; | |
var EventBus = { | |
on: function(eventType, handler) { | |
if (!EventMap[eventType]) { | |
EventMap[eventType] = []; | |
} |
This file contains 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
<form name="anything" confirm-on-exit>......</form> | |
<form name="anything" confirm-on-exit="collection">......</form> |
This file contains 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
[ | |
{"group":"US (Common)", | |
"zones":[ | |
{"value":"America/Puerto_Rico","name":"Puerto Rico (Atlantic)"}, | |
{"value":"America/New_York","name":"New York (Eastern)"}, | |
{"value":"America/Chicago","name":"Chicago (Central)"}, | |
{"value":"America/Denver","name":"Denver (Mountain)"}, | |
{"value":"America/Phoenix","name":"Phoenix (MST)"}, | |
{"value":"America/Los_Angeles","name":"Los Angeles (Pacific)"}, | |
{"value":"America/Anchorage","name":"Anchorage (Alaska)"}, |
This file contains 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
.config(function ($provide) { | |
$provide.decorator('$state', function ($delegate) { | |
// let's locally use 'state' name | |
var state = $delegate; | |
// let's extend this object with new function | |
// 'baseGo', which in fact, will keep the reference | |
// to the original 'go' function | |
state.baseGo = state.go; |
This file contains 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
/** | |
* @ngdoc Directive | |
* @name app.directive.detectViewPort | |
* @module app | |
* | |
* @description | |
* detectViewPort staring component with star | |
* @TODO | |
* onDetectViewPort callback | |
* @author Mohan Singh ( gmail::mslogicmaster@gmail.com, skype :: mohan.singh42 ) |
This file contains 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
<span>Local date & time converted from UTC: {{vm.myUtcDate | utcToLocal:'dd.MM.yy - hh.mm a'}}</span> | |
<!-- Where vm.myUtcLocal = '2016-03-31T00:11:31' (utc) --> |
This file contains 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
[ | |
{ "name": "Afghanistan", "code": "AF" }, | |
{ "name": "Åland Islands", "code": "AX" }, | |
{ "name": "Albania", "code": "AL" }, | |
{ "name": "Algeria", "code": "DZ" }, | |
{ "name": "American Samoa", "code": "AS" }, | |
{ "name": "Andorra", "code": "AD" }, | |
{ "name": "Angola", "code": "AO" }, | |
{ "name": "Anguilla", "code": "AI" }, | |
{ "name": "Antarctica", "code": "AQ" }, |
This file contains 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
$.fn.format = function() { | |
return this.each(function() { | |
var $this = $(this); | |
var time = $this.attr("datetime"); | |
var localTime = moment.utc(time).local().format(); | |
$this.attr("datetime", localTime).timeago(); | |
return this; | |
}); |
This file contains 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
/** | |
* Fix for vw, vh, vmin, vmax on iOS 7. | |
* http://caniuse.com/#feat=viewport-units | |
* | |
* This fix works by replacing viewport units with px values on known screen sizes. | |
* | |
* iPhone 6 and 6 Plus cannot run iOS 7, so are not targeted by this fix. | |
* Target devices running iOS 8+ will incidentally execute the media query, | |
* but this will still produce the expected result; so this is not a problem. |
OlderNewer