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 app = angular.module('app', []); | |
app.controller('testCtr', | |
function priorityCtr($scope, myService, $sce){ | |
myService.getData('dataSource.html').then(function(response){ | |
$scope.data = $sce.trustAsHtml(response); | |
}); | |
}); | |
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'; | |
app.service('teamManagementSvc', function ($resource) { | |
var resource = $resource('/api/:action', | |
{ /*defaults*/ }, | |
{ | |
/* Action definitions */ | |
updateTeamName: { method: 'POST', params: { action: 'Update' }, isArray: false }, | |
getLatest: { method: 'GET', params: { action: 'LatestForTeam' }, isArray: false } | |
}); |
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 data-ng-repeat="message in messages" class="Response"> | |
<div class="Response" ng-class="message.msgType"> | |
<i ng-class="message.iconType"></i> <span class="i-name">{{message.message}}</span> | |
</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
'use strict'; | |
var app = angular.module('app', [ 'ngRoute']); | |
app.config(function ($routeProvider) { | |
$routeProvider | |
.when('/', { | |
templateUrl: '/templates/Admin.html', | |
controller: 'HomeCtr' | |
}) |
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 thisExe = System.Reflection.Assembly.GetExecutingAssembly(); | |
string[] resources = thisExe.GetManifestResourceNames(); | |
string list = ""; | |
// Build the string of resources. | |
foreach (string resource in resources) | |
Console.WriteLine(resource); |
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
[TestClass] | |
public class RoutingTests | |
{ | |
/// <summary> | |
/// unit testing custom route | |
/// </summary> | |
[TestMethod] | |
public void TestingCustomRouteToBindBlogArticle() | |
{ | |
var context = new StubHttpContextForRouting(requestUrl: "~/blog/2014/01/Powershell"); |
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 http = require('http'); | |
var express = require('express'); | |
var _ = require('underscore'); | |
var app = express(); | |
var server = http.createServer(app); | |
server.listen(3000); |
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 http = require('http'); | |
var express = require('express'); | |
var _ = require('underscore'); | |
var app = express(); | |
// sending plain html | |
app.get('/', function(req, res){ | |
res.send('<html><body><h1>Express</h1></body></html>'); | |
}); |
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": "application-name", | |
"version": "0.0.1", | |
"description": "test server", | |
"author": { | |
"name": "cpo", | |
"email": "pavel.svarc@cpodesign.com" | |
}, | |
"dependencies": { | |
"express": "^4.8.5", |
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
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title><%- title%></title> | |
</head> | |
<body> | |
<div> <%- title%></div> | |
</body> | |
</html> |