+ renaming module JSData_ to JSData since it is possible to declare var and module with the same name

This commit is contained in:
reppners
2015-03-04 09:09:27 +01:00
parent eec429264e
commit 5f2cc5b966
6 changed files with 31 additions and 31 deletions
+4 -4
View File
@@ -12,7 +12,7 @@ interface CustomScope extends ng.IScope {
}
angular.module('myApp')
.controller('commentsCtrl', function ($scope:CustomScope, store:JSData_.DS, Comment:JSData_.DSResourceDefinition<any>, User:JSData_.DSResourceDefinition<any>) {
.controller('commentsCtrl', function ($scope:CustomScope, store:JSData.DS, Comment:JSData.DSResourceDefinition<any>, User:JSData.DSResourceDefinition<any>) {
Comment.findAll().then(function (comments) {
$scope.comments = comments;
@@ -54,7 +54,7 @@ angular.module('myApp')
});
angular.module('myApp')
.run(function (DS:JSData_.DS) {
.run(function (DS:JSData.DS) {
// We don't register the "User" resource
// as a service, so it can only be used
// via DS.<method>('user', ...)
@@ -63,7 +63,7 @@ angular.module('myApp')
// only ever have to inject "DS"
DS.defineResource('user');
})
.factory('Comment', function (DS:JSData_.DS) {
.factory('Comment', function (DS:JSData.DS) {
// This code won't execute unless you actually
// inject "Comment" somewhere in your code.
// Thanks Angular...
@@ -73,6 +73,6 @@ angular.module('myApp')
});
angular.module('myApp')
.config(function (DSProvider:JSData_.DSProvider) {
.config(function (DSProvider:JSData.DSProvider) {
DSProvider.defaults.basePath = '/myApi'; // etc.
});
+1 -1
View File
@@ -6,7 +6,7 @@
/// <reference path="../js-data/js-data.d.ts" />
/// <reference path="../angularjs/angular.d.ts" />
declare module JSData_ {
declare module JSData {
interface DSProvider {
defaults:DSConfiguration;