Skip to content

Instantly share code, notes, and snippets.

View adhamankar's full-sized avatar

Abhijeet adhamankar

View GitHub Profile
@adhamankar
adhamankar / IControllerScope.ts
Created January 20, 2015 13:34
AngularJs modalService - Popup service
/// <reference path="../references.ts" />
module Common.Framework {
"use strict";
export interface IControllerScope<T> extends ng.IScope {
vm: T;
}
export class BaseCtrl {
public static $inject = ["$scope"];
@adhamankar
adhamankar / WebApiConfig-cors-setup
Last active August 29, 2015 14:13
WebApi and AngularJS CORS setup
//http://www.asp.net/web-api/overview/security/enabling-cross-origin-requests-in-web-api
//Install-Package Microsoft.AspNet.WebApi.Cors
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
// Web API configuration and services
config.EnableCors(new EnableCorsAttribute("*", "*", "GET,POST,PUT,DELETE"));