0 Comments

If you manually want to get / use Angular services in TypeScript you can use the following code:

 

/// <reference path="../libraries/angular/angular.d.ts" />

module app {
    "use strict";

    var appModule = angular.module("app", []);
    var injector: angular.auto.IInjectorService = angular.injector(["ng"]);
    var httpService: angular.IHttpService = injector.get("$http");
    var qService: angular.IQService = injector.get("$q");
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts

Delegates and Events in C#

0 Comments

Nice article explaining delegates and events in C#: http://www.akadia.com/services/dotnet_delegates_and_events.html