Skip to content

Commit bba7d84

Browse files
committed
reference angular module using prefix "angular", not "ng"
1 parent ed38db4 commit bba7d84

File tree

5 files changed

+43
-43
lines changed

5 files changed

+43
-43
lines changed

angular-translate/angular-translate-tests.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
var app = angular.module('at', ['pascalprecht.translate']);
44

5-
app.config(($translateProvider: ng.translate.ITranslateProvider) => {
5+
app.config(($translateProvider: angular.translate.ITranslateProvider) => {
66
$translateProvider.translations('en', {
77
TITLE: 'Hello',
88
FOO: 'This is a paragraph.',
@@ -22,7 +22,7 @@ interface Scope extends ng.IScope {
2222
changeLanguage(key: any): void;
2323
}
2424

25-
app.controller('Ctrl', ($scope: Scope, $translate: ng.translate.ITranslateService) => {
25+
app.controller('Ctrl', ($scope: Scope, $translate: angular.translate.ITranslateService) => {
2626
$scope['changeLanguage'] = function (key: any) {
2727
$translate.use(key);
2828
};

angular-translate/angular-translate.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ declare module angular.translate {
3333
}
3434

3535
interface ITranslateService {
36-
(translationId: string, interpolateParams?: any, interpolationId?: string): ng.IPromise<string>;
37-
(translationId: string[], interpolateParams?: any, interpolationId?: string): ng.IPromise<{ [key: string]: string }>;
36+
(translationId: string, interpolateParams?: any, interpolationId?: string): angular.IPromise<string>;
37+
(translationId: string[], interpolateParams?: any, interpolationId?: string): angular.IPromise<{ [key: string]: string }>;
3838
cloakClassName(): string;
3939
cloakClassName(name: string): ITranslateProvider;
4040
fallbackLanguage(langKey?: string): string;
@@ -44,17 +44,17 @@ declare module angular.translate {
4444
isPostCompilingEnabled(): boolean;
4545
preferredLanguage(langKey?: string): string;
4646
proposedLanguage(): string;
47-
refresh(langKey?: string): ng.IPromise<void>;
47+
refresh(langKey?: string): angular.IPromise<void>;
4848
storage(): IStorage;
4949
storageKey(): string;
5050
use(): string;
51-
use(key: string): ng.IPromise<string>;
51+
use(key: string): angular.IPromise<string>;
5252
useFallbackLanguage(langKey?: string): void;
5353
versionInfo(): string;
5454
loaderCache(): any;
5555
}
5656

57-
interface ITranslateProvider extends ng.IServiceProvider {
57+
interface ITranslateProvider extends angular.IServiceProvider {
5858
translations(): ITranslationTable;
5959
translations(key: string, translationTable: ITranslationTable): ITranslateProvider;
6060
cloakClassName(): string;

angularjs/angular-resource-tests.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/// <reference path="angular-resource.d.ts" />
22

3-
interface IMyResource extends ng.resource.IResource<IMyResource> { };
4-
interface IMyResourceClass extends ng.resource.IResourceClass<IMyResource> { };
3+
interface IMyResource extends angular.resource.IResource<IMyResource> { };
4+
interface IMyResourceClass extends angular.resource.IResourceClass<IMyResource> { };
55

66
///////////////////////////////////////
77
// IActionDescriptor
88
///////////////////////////////////////
9-
var actionDescriptor: ng.resource.IActionDescriptor;
9+
var actionDescriptor: angular.resource.IActionDescriptor;
1010

1111
actionDescriptor.headers = { header: 'value' };
1212
actionDescriptor.isArray = true;
@@ -19,7 +19,7 @@ actionDescriptor.params = { key: 'value' };
1919
///////////////////////////////////////
2020
var resourceClass: IMyResourceClass;
2121
var resource: IMyResource;
22-
var resourceArray: ng.resource.IResourceArray<IMyResource>;
22+
var resourceArray: angular.resource.IResourceArray<IMyResource>;
2323

2424
resource = resourceClass.delete();
2525
resource = resourceClass.delete({ key: 'value' });
@@ -49,7 +49,7 @@ resourceArray = resourceClass.query({ key: 'value' }, { key: 'value' });
4949
resourceArray = resourceClass.query({ key: 'value' }, { key: 'value' }, function () { });
5050
resourceArray = resourceClass.query({ key: 'value' }, { key: 'value' }, function () { }, function () { });
5151
resourceArray.push(resource);
52-
resourceArray.$promise.then(function(data: ng.resource.IResourceArray<IMyResource>) {});
52+
resourceArray.$promise.then(function(data: angular.resource.IResourceArray<IMyResource>) {});
5353

5454
resource = resourceClass.remove();
5555
resource = resourceClass.remove({ key: 'value' });
@@ -73,8 +73,8 @@ resource = resourceClass.save({ key: 'value' }, { key: 'value' }, function () {
7373
// IResource
7474
///////////////////////////////////////
7575

76-
var promise : ng.IPromise<IMyResource>;
77-
var arrayPromise : ng.IPromise<IMyResource[]>;
76+
var promise : angular.IPromise<IMyResource>;
77+
var arrayPromise : angular.IPromise<IMyResource[]>;
7878

7979
promise = resource.$delete();
8080
promise = resource.$delete({ key: 'value' });
@@ -97,7 +97,7 @@ arrayPromise = resourceArray[0].$query({ key: 'value' }, function () { });
9797
arrayPromise = resourceArray[0].$query(function () { });
9898
arrayPromise = resourceArray[0].$query(function () { }, function () { });
9999
arrayPromise = resourceArray[0].$query({ key: 'value' }, function () { }, function () { });
100-
arrayPromise.then(function(data: ng.resource.IResourceArray<IMyResource>) {});
100+
arrayPromise.then(function(data: angular.resource.IResourceArray<IMyResource>) {});
101101

102102
promise = resource.$remove();
103103
promise = resource.$remove({ key: 'value' });
@@ -116,7 +116,7 @@ promise = resource.$save({ key: 'value' }, function () { }, function () { });
116116
///////////////////////////////////////
117117
// IResourceService
118118
///////////////////////////////////////
119-
var resourceService: ng.resource.IResourceService;
119+
var resourceService: angular.resource.IResourceService;
120120
resourceClass = resourceService<IMyResource, IMyResourceClass>('test');
121121
resourceClass = resourceService<IMyResource>('test');
122122
resourceClass = resourceService('test');
@@ -125,12 +125,12 @@ resourceClass = resourceService('test');
125125
// IModule
126126
///////////////////////////////////////
127127
var mod: ng.IModule;
128-
var resourceServiceFactoryFunction: ng.resource.IResourceServiceFactoryFunction<IMyResource>;
129-
var resourceService: ng.resource.IResourceService;
128+
var resourceServiceFactoryFunction: angular.resource.IResourceServiceFactoryFunction<IMyResource>;
129+
var resourceService: angular.resource.IResourceService;
130130

131131
resourceClass = resourceServiceFactoryFunction<IMyResourceClass>(resourceService);
132132

133-
resourceServiceFactoryFunction = function (resourceService: ng.resource.IResourceService) { return <any>resourceClass; };
133+
resourceServiceFactoryFunction = function (resourceService: angular.resource.IResourceService) { return <any>resourceClass; };
134134
mod = mod.factory('factory name', resourceServiceFactoryFunction);
135135

136136
///////////////////////////////////////

angularjs/angular-resource.d.ts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -104,28 +104,28 @@ declare module angular.resource {
104104
// Instance calls always return the the promise of the request which retrieved the object
105105
// https://github.com/angular/angular.js/blob/v1.2.0/src/ngResource/resource.js#L538-L546
106106
interface IResource<T> {
107-
$get(): ng.IPromise<T>;
108-
$get(params?: Object, success?: Function, error?: Function): ng.IPromise<T>;
109-
$get(success: Function, error?: Function): ng.IPromise<T>;
107+
$get(): angular.IPromise<T>;
108+
$get(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
109+
$get(success: Function, error?: Function): angular.IPromise<T>;
110110

111-
$query(): ng.IPromise<IResourceArray<T>>;
112-
$query(params?: Object, success?: Function, error?: Function): ng.IPromise<IResourceArray<T>>;
113-
$query(success: Function, error?: Function): ng.IPromise<IResourceArray<T>>;
111+
$query(): angular.IPromise<IResourceArray<T>>;
112+
$query(params?: Object, success?: Function, error?: Function): angular.IPromise<IResourceArray<T>>;
113+
$query(success: Function, error?: Function): angular.IPromise<IResourceArray<T>>;
114114

115-
$save(): ng.IPromise<T>;
116-
$save(params?: Object, success?: Function, error?: Function): ng.IPromise<T>;
117-
$save(success: Function, error?: Function): ng.IPromise<T>;
115+
$save(): angular.IPromise<T>;
116+
$save(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
117+
$save(success: Function, error?: Function): angular.IPromise<T>;
118118

119-
$remove(): ng.IPromise<T>;
120-
$remove(params?: Object, success?: Function, error?: Function): ng.IPromise<T>;
121-
$remove(success: Function, error?: Function): ng.IPromise<T>;
119+
$remove(): angular.IPromise<T>;
120+
$remove(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
121+
$remove(success: Function, error?: Function): angular.IPromise<T>;
122122

123-
$delete(): ng.IPromise<T>;
124-
$delete(params?: Object, success?: Function, error?: Function): ng.IPromise<T>;
125-
$delete(success: Function, error?: Function): ng.IPromise<T>;
123+
$delete(): angular.IPromise<T>;
124+
$delete(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
125+
$delete(success: Function, error?: Function): angular.IPromise<T>;
126126

127127
/** the promise of the original server interaction that created this instance. **/
128-
$promise : ng.IPromise<T>;
128+
$promise : angular.IPromise<T>;
129129
$resolved : boolean;
130130
}
131131

@@ -134,14 +134,14 @@ declare module angular.resource {
134134
*/
135135
interface IResourceArray<T> extends Array<T> {
136136
/** the promise of the original server interaction that created this collection. **/
137-
$promise : ng.IPromise<IResourceArray<T>>;
137+
$promise : angular.IPromise<IResourceArray<T>>;
138138
$resolved : boolean;
139139
}
140140

141141
/** when creating a resource factory via IModule.factory */
142142
interface IResourceServiceFactoryFunction<T> {
143-
($resource: ng.resource.IResourceService): IResourceClass<T>;
144-
<U extends IResourceClass<T>>($resource: ng.resource.IResourceService): U;
143+
($resource: angular.resource.IResourceService): IResourceClass<T>;
144+
<U extends IResourceClass<T>>($resource: angular.resource.IResourceService): U;
145145
}
146146
}
147147

@@ -150,13 +150,13 @@ declare module angular {
150150

151151
interface IModule {
152152
/** creating a resource service factory */
153-
factory(name: string, resourceServiceFactoryFunction: ng.resource.IResourceServiceFactoryFunction<any>): IModule;
153+
factory(name: string, resourceServiceFactoryFunction: angular.resource.IResourceServiceFactoryFunction<any>): IModule;
154154
}
155155
}
156156

157157
interface Array<T>
158158
{
159159
/** the promise of the original server interaction that created this collection. **/
160-
$promise : ng.IPromise<Array<T>>;
160+
$promise : angular.IPromise<Array<T>>;
161161
$resolved : boolean;
162162
}

angularjs/angular-route.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ declare module angular.route {
6363
*
6464
* {Array.<Object>} - route parameters extracted from the current $location.path() by applying the current route
6565
*/
66-
template?: string|{($routeParams?: ng.route.IRouteParamsService) : string;}
66+
template?: string|{($routeParams?: angular.route.IRouteParamsService) : string;}
6767
/**
6868
* {string=|function()=}
6969
* Path or function that returns a path to an html template that should be used by ngView.
@@ -72,7 +72,7 @@ declare module angular.route {
7272
*
7373
* {Array.<Object>} - route parameters extracted from the current $location.path() by applying the current route
7474
*/
75-
templateUrl?: string|{ ($routeParams?: ng.route.IRouteParamsService): string; }
75+
templateUrl?: string|{ ($routeParams?: angular.route.IRouteParamsService): string; }
7676
/**
7777
* {Object.<string, function>=} - An optional map of dependencies which should be injected into the controller. If any of these dependencies are promises, the router will wait for them all to be resolved or one to be rejected before the controller is instantiated. If all the promises are resolved successfully, the values of the resolved promises are injected and $routeChangeSuccess event is fired. If any of the promises are rejected the $routeChangeError event is fired. The map object is:
7878
*
@@ -91,7 +91,7 @@ declare module angular.route {
9191
* - {Object} - current $location.search()
9292
* - The custom redirectTo function is expected to return a string which will be used to update $location.path() and $location.search().
9393
*/
94-
redirectTo?: string|{($routeParams?: ng.route.IRouteParamsService, $locationPath?: string, $locationSearch?: any) : string};
94+
redirectTo?: string|{($routeParams?: angular.route.IRouteParamsService, $locationPath?: string, $locationSearch?: any) : string};
9595
/**
9696
* Reload route when only $location.search() or $location.hash() changes.
9797
*

0 commit comments

Comments
 (0)