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
### Keybase proof | |
I hereby claim: | |
* I am sonicblis on github. | |
* I am chrisjo (https://keybase.io/chrisjo) on keybase. | |
* I have a public key ASAB0rA0qkj-MBZK_MiEZIj4-o-gdPFPlIGe4pZ3brUZqgo | |
To claim this, I am signing this object: |
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.directive('focusWhen', function($timeout, $parse) { | |
return { | |
link: function(scope, element, attrs) { | |
var model = $parse(attrs.focusWhen); | |
scope.$watch(model, function(value) { | |
if(value === true) { | |
$timeout(function() { | |
element[0].focus(); | |
}); | |
} |
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.filter('html', function ($sce) { | |
return function (val) { | |
return $sce.trustAsHtml(val); | |
}; | |
}); |
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.directive('constrainDate', function () { | |
return { | |
restrict: 'A', | |
require: 'ngModel', | |
link: function (scope, elem, attrs, ngModelCtrl) { | |
var dRegex; | |
if (attrs.contrainDate){ | |
dRegex = new RegExp(attrs.constrainDate); | |
} | |
ngModelCtrl.$parsers.splice(0, 0, function patternCheck (value) { |
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
var jsonFormatter = config.Formatters.OfType<JsonMediaTypeFormatter>().First(); | |
jsonFormatter.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver(); |