Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
}, function (error) {
// TODO: parse error messages, generate toast popups
// {"Email":["The Email field is required.","The Email field is not a valid e-mail address."],"Password":["The Password field is required.","The Password must be at least 6 characters long."]}
alert(error.text());
console.log(error.text());
});
};
return ChangePasswordComponent;
}());
ChangePasswordComponent = __decorate([
core_1.Component({
selector: 'register',
templateUrl: 'partial/changePasswordComponent'
}),
__metadata("design:paramtypes", [router_1.Router, platform_browser_1.Title, http_1.Http, auth_service_1.AuthService, ngx_toastr_1.ToastrService])
], ChangePasswordComponent);
exports.ChangePasswordComponent = ChangePasswordComponent;
//# sourceMappingURL=changePassword.component.js.map
}
}, function (error) {
// TODO: parse error messages, generate toast popups
// {"Email":["The Email field is required.","The Email field is not a valid e-mail address."],"Password":["The Password field is required.","The Password must be at least 6 characters long."]}
alert(error.text());
console.log(error.text());
});
};
return ChangePasswordComponent;
}());
ChangePasswordComponent = __decorate([
core_1.Component({
selector: 'register',
templateUrl: 'partial/changePasswordComponent'
}),
__metadata("design:paramtypes", [router_1.Router, platform_browser_1.Title, http_1.Http, auth_service_1.AuthService, ngx_toastr_1.ToastrService])
], ChangePasswordComponent);
exports.ChangePasswordComponent = ChangePasswordComponent;
//# sourceMappingURL=changePassword.component.js.map
var ContactComponent = (function () {
// this is not meant to be secured; demonstrating a component that is open to anonymous users to access
function ContactComponent(toastrService) {
this.toastrService = toastrService;
}
ContactComponent.prototype.showSuccess = function () {
this.toastrService.success('Hello world!', 'Toastr fun!');
};
return ContactComponent;
}());
ContactComponent = __decorate([
core_1.Component({
selector: 'my-contact',
templateUrl: 'partial/contactComponent'
}),
__metadata("design:paramtypes", [ngx_toastr_1.ToastrService])
], ContactComponent);
exports.ContactComponent = ContactComponent;
//# sourceMappingURL=contact.component.js.map
var ContactComponent = (function () {
// this is not meant to be secured; demonstrating a component that is open to anonymous users to access
function ContactComponent(toastrService) {
this.toastrService = toastrService;
}
ContactComponent.prototype.showSuccess = function () {
this.toastrService.success('Hello world!', 'Toastr fun!');
};
return ContactComponent;
}());
ContactComponent = __decorate([
core_1.Component({
selector: 'my-contact',
templateUrl: 'partial/contactComponent'
}),
__metadata("design:paramtypes", [ngx_toastr_1.ToastrService])
], ContactComponent);
exports.ContactComponent = ContactComponent;
//# sourceMappingURL=contact.component.js.map
}
else {
_this.showError('Delete', "An error occurred");
}
}, function (error) {
_this.showError('Delete', JSON.stringify(error));
});
};
return AboutComponent;
}());
AboutComponent = __decorate([
core_1.Component({
selector: 'my-about',
templateUrl: 'partial/aboutComponent'
}),
__metadata("design:paramtypes", [sampleData_service_1.SampleDataService, ngx_toastr_1.ToastrService])
], AboutComponent);
exports.AboutComponent = AboutComponent;
//# sourceMappingURL=about.component.js.map
}
else {
_this.showError('Delete', status.value);
}
}, function (error) {
_this.showError('Delete', JSON.stringify(error));
});
};
return AboutComponent;
}());
AboutComponent = __decorate([
core_1.Component({
selector: 'my-about',
templateUrl: '/partial/aboutComponent'
}),
__metadata("design:paramtypes", [SampleDataService_1.SampleDataService, ngx_toastr_1.ToastrService])
], AboutComponent);
exports.AboutComponent = AboutComponent;
//# sourceMappingURL=about.component.js.map
}
else {
_this.showError('Delete', "An error occurred");
}
}, function (error) {
_this.showError('Delete', JSON.stringify(error));
});
};
return AboutComponent;
}());
AboutComponent = __decorate([
core_1.Component({
selector: 'my-about',
templateUrl: 'partial/aboutComponent'
}),
__metadata("design:paramtypes", [sampleData_service_1.SampleDataService, ngx_toastr_1.ToastrService])
], AboutComponent);
exports.AboutComponent = AboutComponent;
//# sourceMappingURL=about.component.js.map
if (i < error.length)
errorMessage += ", ";
}
return errorMessage;
};
ErrorMessageService.prototype.showSuccess = function (title, message) {
this.toastrService.success(message, title);
};
ErrorMessageService.prototype.showError = function (title, message) {
this.toastrService.error(message, title);
};
return ErrorMessageService;
}());
ErrorMessageService = __decorate([
core_1.Injectable(),
__metadata("design:paramtypes", [ngx_toastr_1.ToastrService])
], ErrorMessageService);
exports.ErrorMessageService = ErrorMessageService;
//# sourceMappingURL=ErrorMessageService.js.map