From 855b59aff32d87b360546d501bb9b03a49e27d95 Mon Sep 17 00:00:00 2001 From: Michael Knoch Date: Thu, 24 Mar 2016 21:34:11 +0100 Subject: [PATCH] cleanup, remove js and map files --- .gitignore | 5 +- app/LocationComponent/location.component.js | 46 ----------------- .../location.component.js.map | 1 - app/LocationComponent/location.component.ts | 14 +++-- app/UserComponent/UserComponent.js | 1 - app/UserComponent/UserComponent.js.map | 1 - app/UserComponent/user.component.js | 46 ----------------- app/UserComponent/user.component.js.map | 1 - app/app.component.js | 51 ------------------- app/app.component.js.map | 1 - app/app.component.ts | 5 +- app/main.js | 23 --------- app/main.js.map | 1 - app/services/location.service.ts | 12 +++++ app/services/locationService.js | 21 -------- app/services/locationService.js.map | 1 - app/services/locationService.ts | 10 ---- 17 files changed, 31 insertions(+), 209 deletions(-) delete mode 100644 app/LocationComponent/location.component.js delete mode 100644 app/LocationComponent/location.component.js.map delete mode 100644 app/UserComponent/UserComponent.js delete mode 100644 app/UserComponent/UserComponent.js.map delete mode 100644 app/UserComponent/user.component.js delete mode 100644 app/UserComponent/user.component.js.map delete mode 100644 app/app.component.js delete mode 100644 app/app.component.js.map delete mode 100644 app/main.js delete mode 100644 app/main.js.map create mode 100644 app/services/location.service.ts delete mode 100644 app/services/locationService.js delete mode 100644 app/services/locationService.js.map delete mode 100644 app/services/locationService.ts diff --git a/.gitignore b/.gitignore index 94a47fa..a15f6cb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ node_modules/ .idea -typings \ No newline at end of file +typings + +*.js +*js.map \ No newline at end of file diff --git a/app/LocationComponent/location.component.js b/app/LocationComponent/location.component.js deleted file mode 100644 index 55f6551..0000000 --- a/app/LocationComponent/location.component.js +++ /dev/null @@ -1,46 +0,0 @@ -System.register(['angular2/core', 'angular2/router'], function(exports_1, context_1) { - "use strict"; - var __moduleName = context_1 && context_1.id; - var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; - var core_1, router_1; - var LocationComponent; - return { - setters:[ - function (core_1_1) { - core_1 = core_1_1; - }, - function (router_1_1) { - router_1 = router_1_1; - }], - execute: function() { - LocationComponent = (function () { - function LocationComponent(_router, _routeParams) { - this._router = _router; - this._routeParams = _routeParams; - } - LocationComponent.prototype.ngOnInit = function () { - var id = this._routeParams.get('id'); - console.info(id); - //this._service.getHero(id).then(hero => this.hero = hero); - }; - LocationComponent = __decorate([ - core_1.Component({ - template: '

Location

' - }), - __metadata('design:paramtypes', [router_1.Router, router_1.RouteParams]) - ], LocationComponent); - return LocationComponent; - }()); - exports_1("LocationComponent", LocationComponent); - } - } -}); -//# sourceMappingURL=location.component.js.map \ No newline at end of file diff --git a/app/LocationComponent/location.component.js.map b/app/LocationComponent/location.component.js.map deleted file mode 100644 index 91a74bc..0000000 --- a/app/LocationComponent/location.component.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"location.component.js","sourceRoot":"","sources":["location.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;YAMA;gBAII,2BAAoB,OAAc,EACd,YAAwB;oBADxB,YAAO,GAAP,OAAO,CAAO;oBACd,iBAAY,GAAZ,YAAY,CAAY;gBAAG,CAAC;gBAEhD,oCAAQ,GAAR;oBACI,IAAI,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;oBACrC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;oBACjB,2DAA2D;gBAC/D,CAAC;gBAdL;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,mBAAmB;qBAChC,CAAC;;qCAAA;gBAcF,wBAAC;YAAD,CAAC,AAbD,IAaC;YAbD,iDAaC,CAAA"} \ No newline at end of file diff --git a/app/LocationComponent/location.component.ts b/app/LocationComponent/location.component.ts index c8edb6a..54e9a09 100644 --- a/app/LocationComponent/location.component.ts +++ b/app/LocationComponent/location.component.ts @@ -1,5 +1,6 @@ import {Component} from 'angular2/core'; import {RouteParams, Router} from 'angular2/router'; +import {LocationService} from '../services/location.service' @Component({ template: '

Location

' @@ -9,12 +10,19 @@ export class LocationComponent implements OnInit { location:Location; constructor(private _router:Router, - private _routeParams:RouteParams) {} + private _routeParams:RouteParams, + private _locationService:LocationService) { + + _locationService.locations + .subscribe( + people => this.people = people, + error => console.error('Error: ' + err), + () => console.log('Completed!') + ); + } ngOnInit() { let id = this._routeParams.get('id'); - console.info(id); - //this._service.getHero(id).then(hero => this.hero = hero); } } \ No newline at end of file diff --git a/app/UserComponent/UserComponent.js b/app/UserComponent/UserComponent.js deleted file mode 100644 index 7429dd8..0000000 --- a/app/UserComponent/UserComponent.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=UserComponent.js.map \ No newline at end of file diff --git a/app/UserComponent/UserComponent.js.map b/app/UserComponent/UserComponent.js.map deleted file mode 100644 index 944a615..0000000 --- a/app/UserComponent/UserComponent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserComponent.js","sourceRoot":"","sources":["UserComponent.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/app/UserComponent/user.component.js b/app/UserComponent/user.component.js deleted file mode 100644 index 5cf8bad..0000000 --- a/app/UserComponent/user.component.js +++ /dev/null @@ -1,46 +0,0 @@ -System.register(['angular2/core', 'angular2/router'], function(exports_1, context_1) { - "use strict"; - var __moduleName = context_1 && context_1.id; - var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; - var core_1, router_1; - var UserComponent; - return { - setters:[ - function (core_1_1) { - core_1 = core_1_1; - }, - function (router_1_1) { - router_1 = router_1_1; - }], - execute: function() { - UserComponent = (function () { - function UserComponent(_router, _routeParams) { - this._router = _router; - this._routeParams = _routeParams; - } - UserComponent.prototype.ngOnInit = function () { - var id = this._routeParams.get('id'); - console.info(id); - //this._service.getHero(id).then(hero => this.hero = hero); - }; - UserComponent = __decorate([ - core_1.Component({ - template: '

Location

' - }), - __metadata('design:paramtypes', [router_1.Router, router_1.RouteParams]) - ], UserComponent); - return UserComponent; - }()); - exports_1("UserComponent", UserComponent); - } - } -}); -//# sourceMappingURL=user.component.js.map \ No newline at end of file diff --git a/app/UserComponent/user.component.js.map b/app/UserComponent/user.component.js.map deleted file mode 100644 index f632485..0000000 --- a/app/UserComponent/user.component.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"user.component.js","sourceRoot":"","sources":["user.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;YAOA;gBAII,uBAAoB,OAAc,EACd,YAAwB;oBADxB,YAAO,GAAP,OAAO,CAAO;oBACd,iBAAY,GAAZ,YAAY,CAAY;gBAC5C,CAAC;gBAED,gCAAQ,GAAR;oBACI,IAAI,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;oBACrC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;oBACjB,2DAA2D;gBAC/D,CAAC;gBAhBL;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,mBAAmB;qBAChC,CAAC;;iCAAA;gBAgBF,oBAAC;YAAD,CAAC,AAdD,IAcC;YAdD,yCAcC,CAAA"} \ No newline at end of file diff --git a/app/app.component.js b/app/app.component.js deleted file mode 100644 index 36cd9ce..0000000 --- a/app/app.component.js +++ /dev/null @@ -1,51 +0,0 @@ -System.register(['angular2/core', 'angular2/router', './LocationComponent/location.component', './UserComponent/user.component'], function(exports_1, context_1) { - "use strict"; - var __moduleName = context_1 && context_1.id; - var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; - var core_1, router_1, location_component_1, user_component_1; - var AppComponent; - return { - setters:[ - function (core_1_1) { - core_1 = core_1_1; - }, - function (router_1_1) { - router_1 = router_1_1; - }, - function (location_component_1_1) { - location_component_1 = location_component_1_1; - }, - function (user_component_1_1) { - user_component_1 = user_component_1_1; - }], - execute: function() { - AppComponent = (function () { - function AppComponent() { - } - AppComponent = __decorate([ - core_1.Component({ - selector: 'dash', - template: '', - directives: [router_1.ROUTER_DIRECTIVES] - }), - router_1.RouteConfig([ - { path: '/location/:id', name: 'Location', component: location_component_1.LocationComponent }, - { path: '/user/:id', name: 'User', component: user_component_1.UserComponent }, - ]), - __metadata('design:paramtypes', []) - ], AppComponent); - return AppComponent; - }()); - exports_1("AppComponent", AppComponent); - } - } -}); -//# sourceMappingURL=app.component.js.map \ No newline at end of file diff --git a/app/app.component.js.map b/app/app.component.js.map deleted file mode 100644 index 6f2013e..0000000 --- a/app/app.component.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"app.component.js","sourceRoot":"","sources":["app.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAiBA;gBAAA;gBAA2B,CAAC;gBAX5B;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,MAAM;wBAChB,QAAQ,EAAE,iCAAiC;wBAC3C,UAAU,EAAE,CAAC,0BAAiB,CAAC;qBAClC,CAAC;oBAED,oBAAW,CAAC;wBACT,EAAC,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,sCAAiB,EAAC;wBACvE,EAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,8BAAa,EAAC;qBAC9D,CAAC;;gCAAA;gBAEyB,mBAAC;YAAD,CAAC,AAA5B,IAA4B;YAA5B,uCAA4B,CAAA"} \ No newline at end of file diff --git a/app/app.component.ts b/app/app.component.ts index 3e95b0a..b752376 100644 --- a/app/app.component.ts +++ b/app/app.component.ts @@ -4,6 +4,8 @@ import {RouteConfig, ROUTER_DIRECTIVES} from 'angular2/router'; import {LocationComponent} from './LocationComponent/location.component'; import {UserComponent} from './UserComponent/user.component'; +import {LocationService} from './services/location.service'; + @Component({ selector: 'dash', template: '', @@ -15,4 +17,5 @@ import {UserComponent} from './UserComponent/user.component'; {path: '/user/:id', name: 'User', component: UserComponent}, ]) -export class AppComponent {} \ No newline at end of file +export class AppComponent { +} \ No newline at end of file diff --git a/app/main.js b/app/main.js deleted file mode 100644 index 1d7915a..0000000 --- a/app/main.js +++ /dev/null @@ -1,23 +0,0 @@ -System.register(['./app.component', 'angular2/platform/browser', 'angular2/router'], function(exports_1, context_1) { - "use strict"; - var __moduleName = context_1 && context_1.id; - var app_component_1, browser_1, router_1; - return { - setters:[ - function (app_component_1_1) { - app_component_1 = app_component_1_1; - }, - function (browser_1_1) { - browser_1 = browser_1_1; - }, - function (router_1_1) { - router_1 = router_1_1; - }], - execute: function() { - browser_1.bootstrap(app_component_1.AppComponent, [ - router_1.ROUTER_PROVIDERS - ]); - } - } -}); -//# sourceMappingURL=main.js.map \ No newline at end of file diff --git a/app/main.js.map b/app/main.js.map deleted file mode 100644 index 4931b6b..0000000 --- a/app/main.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"main.js","sourceRoot":"","sources":["main.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;YAIA,mBAAS,CAAC,4BAAY,EAAE;gBACpB,yBAAgB;aACnB,CAAC,CAAC"} \ No newline at end of file diff --git a/app/services/location.service.ts b/app/services/location.service.ts new file mode 100644 index 0000000..c519fc8 --- /dev/null +++ b/app/services/location.service.ts @@ -0,0 +1,12 @@ +import {Injectable} from 'angular2/angular2'; +import {Http} from 'angular2/http'; + +@Injectable() +export class LocationService { + + constructor(http:Http) { + this.locations = http.get("http://locator.in.htwg-konstanz.de:2020/locations/nearby?long=9.169753789901733&lat=47.66868204997508&maxDistance=100000000000&limit=1000000000") + .map(response => response.json()); + } +} + diff --git a/app/services/locationService.js b/app/services/locationService.js deleted file mode 100644 index f3ebb91..0000000 --- a/app/services/locationService.js +++ /dev/null @@ -1,21 +0,0 @@ -System.register([], function(exports_1, context_1) { - "use strict"; - var __moduleName = context_1 && context_1.id; - var LocationService; - return { - setters:[], - execute: function() { - LocationService = (function () { - function LocationService() { - } - LocationService.prototype.getLocations = function () { - http.get("http://locator.in.htwg-konstanz.de:2020/locations/nearby?long=9.169753789901733&lat=47.66868204997508&maxDistance=100000000000&limit=1000000000") - .map(function (res) { return res.json(); }); - }; - return LocationService; - }()); - exports_1("LocationService", LocationService); - } - } -}); -//# sourceMappingURL=locationService.js.map \ No newline at end of file diff --git a/app/services/locationService.js.map b/app/services/locationService.js.map deleted file mode 100644 index f92023e..0000000 --- a/app/services/locationService.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"locationService.js","sourceRoot":"","sources":["locationService.ts"],"names":[],"mappings":";;;;;;;YAEA;gBAAA;gBAOA,CAAC;gBALG,sCAAY,GAAZ;oBACI,IAAI,CAAC,GAAG,CAAC,iJAAiJ,CAAC;yBACtJ,GAAG,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,IAAI,EAAE,EAAV,CAAU,CAAC,CAAA;gBAC/B,CAAC;gBAEL,sBAAC;YAAD,CAAC,AAPD,IAOC;YAPD,6CAOC,CAAA"} \ No newline at end of file diff --git a/app/services/locationService.ts b/app/services/locationService.ts deleted file mode 100644 index 8cc69fc..0000000 --- a/app/services/locationService.ts +++ /dev/null @@ -1,10 +0,0 @@ -import {Http, HTTP_PROVIDERS} from 'angular2/http'; - -export class LocationService { - - getLocations() { - http.get("http://locator.in.htwg-konstanz.de:2020/locations/nearby?long=9.169753789901733&lat=47.66868204997508&maxDistance=100000000000&limit=1000000000") - .map(res => res.json()) - } - -} \ No newline at end of file