Including Jquery in a Angular service
angularjs, javascript, jquery, typescript
Solution
If you wanted to use it as a service you could do:
yourAppModule.service('$',function(){return $;});
Which takes jquery from window and makes it an angular service. But it's just simpler to use jQuery off of window.
PS: Its better if you put any DOM access in an angular directive. Controllers really aren't the place for manual DOM manipulation.
Problem
I am using a service that uses jquery, and $ still is not correctly injected Service: ``` class Service{ constructor(private $q: ng.IQService, private $: JQueryStatic, private $http: ng.IHttpService) { } ``` How can I include $ typing that is in my jquery.d.ts file?