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
/** | |
* @ngDoc Directive | |
* @name app.Directive.onKeyEnter | |
* @module app | |
* | |
* @description | |
* this directive triggers callback function when enter key is pressed | |
* | |
* @author Mohan Singh <mslogicmaster@gmail.com> | |
* |
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
anglar.module('myApp',['ui']).config(["$provide", function($provide) { | |
return $provide.decorator("$http", ["$delegate", function($delegate) { | |
var get = $delegate.get; | |
$delegate.get = function(url, config) { | |
// Check is to avoid breaking AngularUI ui-bootstrap-tpls.js: "template/accordion/accordion-group.html" | |
if (!~url.indexOf('template/')) { | |
// Append ?v=[cacheBustVersion] to url | |
url += (url.indexOf("?") === -1 ? "?" : "&"); | |
url += "v=" + cacheBustVersion; | |
} |
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 defaultValue | |
* @restrict 'A' | |
* @element ANY | |
* @author Mohan Singh ( gmail::mslogicmaster@gmail.com, skype :: mohan.singh42 ) | |
**/ | |
(function () { | |
'use strict'; | |
angular |
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
/* Checks if localStorage exists on the browser, if not, creates a JSONFallbackStorage object where all the data will be stored. Also creates the localStorage methods so you won't need to change anything on your script. Just remember to send the data on JSONFallbackStore to the server. */ | |
(function(window, undefined){ | |
if (typeof(localStorage) === undefined) { | |
JSONFallbackStore = {}; | |
window.localStorage = { | |
getItem: function(key){ | |
return JSONFallbackStore[key]; | |
}, | |
setItem: function(key, value){ |
OlderNewer