
public.out-tsc.app.car.car-detail.component.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fitnesse-connect-testbed-backend Show documentation
Show all versions of fitnesse-connect-testbed-backend Show documentation
Test server for integration tests
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);
};
import { Component } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { CarService } from './car.service';
export var CarDetailComponent = (function () {
function CarDetailComponent(route, router, carService) {
this.route = route;
this.router = router;
this.carService = carService;
}
CarDetailComponent.prototype.ngOnDestroy = function () {
this.subscription.unsubscribe();
};
CarDetailComponent.prototype.ngOnInit = function () {
var _this = this;
this.subscription = this.route.params.subscribe(function (params) {
_this.carIndex = params['id'];
_this.carService.getCar(_this.carIndex).subscribe(function (data) {
_this.selectedCar = data;
});
});
};
CarDetailComponent.prototype.onDeleteCar = function () {
this.carService.deteleCar(this.selectedCar).subscribe();
this.router.navigate(['/cars']);
};
CarDetailComponent.prototype.onEditCar = function () {
this.router.navigate(['/cars', this.selectedCar.id, 'edit']);
};
CarDetailComponent = __decorate([
Component({
selector: 'app-car-detail',
templateUrl: './car-detail.component.html'
}),
__metadata('design:paramtypes', [ActivatedRoute, Router, CarService])
], CarDetailComponent);
return CarDetailComponent;
}());
//# sourceMappingURL=C:/Projects/FitNesseConnect/fitnesse-connect-testbed-ui/src/app/car/car-detail.component.js.map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy