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
using System; | |
using System.Collections.Generic; | |
using System.Collections.Immutable; | |
using System.Linq; | |
using Microsoft.Extensions.DependencyInjection; | |
namespace DITest | |
{ | |
public static class ServiceCollectionCheckerExtensions | |
{ |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration> | |
<configSections> | |
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow"/> | |
</configSections> | |
<specFlow> | |
<language feature="en-US" /> | |
<unitTestProvider name="xUnit" /> |
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
(function () { | |
var dateTimeController = function ($scope, $rootScope) { | |
$scope.vm = { | |
message: "Bootstrap DateTimePicker Directive", | |
dateTime: {} | |
}; | |
$scope.$watch('change', function(){ | |
console.log($scope.vm.dateTime); | |
}); |
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
'use strict'; | |
angular | |
.module('datetimepicker', []) | |
.provider('datetimepicker', function () { | |
var default_options = {}; | |
this.setOptions = function (options) { | |
default_options = options; |
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('templateRepository', [ '$injector', function($injector) { | |
function lookupUrlFor(contentType) { | |
// Do your translation here | |
} | |
return { | |
getTemplate: function(contentType) { | |
var templateCache = $injector.get('$templateCache'); | |
return templateCache.get(lookupUrlFor(contentType)); | |
} |
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.config(["$provide", function ($provide) { | |
$provide.decorator("$templateCache", ["$delegate", "templateRepository", function ($delegate, templateRepository) { | |
// Stash away the original get method | |
var origGetMethod = $delegate.get; | |
// Replace it with our getter | |
$delegate.get = function (url) { | |
// Do we match our content type family prefix? | |
var prefix = 'application/vnd.endjin.test'; | |
if (url.slice(0, prefix.length) == prefix) { | |
return templateRepository.getTemplate(url); |
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
<div class="someParent"> | |
<div ng-include="translateContentTypeToUri(resource.contentType)"></div> | |
</div> |
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
$scope.translateContentTypeToUri = function(contentType) { | |
return '/api/views/' + encodeURIComponent(contentType); | |
}; | |
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
<div ng-controller="SalutationController"> | |
<p><span ng-bind="content.salutation"></span> <span ng-bind="content.greet"></span></p> | |
</div> |
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
<div class="someParent"> | |
<div ng-include="resource.contentType"></div> | |
</div> |
NewerOlder