Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.spinnerService = spinnerService;
}
PortfolioService.prototype.getCompanies = function (user) {
this.log.info('PortfolioService.getCompanies');
this.log.error('PortfolioService.getCompanies');
return this.af.database.list(this.config.baseUrls.portfolio + "/" + user, {
query: {
orderByChild: 'order',
}
});
};
PortfolioService = __decorate([
// TODO: move to shared?
core_1.Injectable(),
__param(0, core_1.Inject(index_1.APP_CONFIG)),
__metadata('design:paramtypes', [Object, log_service_1.LogService, angularfire2_1.AngularFire, spinner_service_1.SpinnerService])
], PortfolioService);
return PortfolioService;
}());
exports.PortfolioService = PortfolioService;
this.config = config;
this.af = af;
this.spinnerService = spinnerService;
}
WatchListService.prototype.getCompanies = function (user) {
return this.af.database.list(this.config.baseUrls.watchList + "/" + user, {
query: {
orderByChild: 'order',
}
});
};
WatchListService = __decorate([
// TODO: move to shared?
core_1.Injectable(),
__param(0, core_1.Inject(index_1.APP_CONFIG)),
__metadata('design:paramtypes', [Object, angularfire2_1.AngularFire, spinner_service_1.SpinnerService])
], WatchListService);
return WatchListService;
}());
exports.WatchListService = WatchListService;
var AuthGuard = (function () {
function AuthGuard(af, router) {
this.af = af;
this.router = router;
}
AuthGuard.prototype.canActivate = function () {
// debugger;
// if (this.af.auth) { return true; }
// this.router.navigate(['/login']);
// return false;
return true;
};
AuthGuard = __decorate([
core_1.Injectable(),
__metadata('design:paramtypes', [angularfire2_1.AngularFire, router_1.Router])
], AuthGuard);
return AuthGuard;
}());
exports.AuthGuard = AuthGuard;
var TeamService = (function () {
function TeamService(af) {
this.af = af;
}
TeamService.prototype.getTeam = function () {
return this.af.database.list('about/team', { query: { orderByChild: 'order' } });
};
TeamService = __decorate([
core_1.Injectable(),
__metadata('design:paramtypes', [angularfire2_1.AngularFire])
], TeamService);
return TeamService;
}());
exports.TeamService = TeamService;
};
AppComponent.prototype.update = function (key, name) {
this.items.update(key, { name: name });
};
AppComponent.prototype.deleteItem = function (key) {
this.items.remove(key);
};
AppComponent.prototype.deleteEverything = function () {
this.items.remove();
};
AppComponent = __decorate([
core_1.Component({
selector: 'my-app',
template: "\n <ul>\n <li>\n <input type="\"text\"">\n <button>Update</button>\n <button>Delete</button>\n </li>\n </ul>\n <input type="\"text\"">\n <button>Add</button>\n <button>Delete All</button>\n ",
}),
__metadata('design:paramtypes', [angularfire2_1.AngularFire])
], AppComponent);
return AppComponent;
}());
exports.AppComponent = AppComponent;
var CompaniesService = (function () {
function CompaniesService(af) {
this.af = af;
}
CompaniesService.prototype.getCompanies = function () {
return this.af.database.list('companies');
};
CompaniesService.prototype.getCompany = function (symbol) {
return this.af.database.object("companies/" + symbol);
};
CompaniesService = __decorate([
core_1.Injectable(),
__metadata('design:paramtypes', [angularfire2_1.AngularFire])
], CompaniesService);
return CompaniesService;
}());
exports.CompaniesService = CompaniesService;
var TermsService = (function () {
function TermsService(af) {
this.af = af;
}
TermsService.prototype.getTerms = function () {
return this.af.database.list('glossary');
};
TermsService = __decorate([
core_1.Injectable(),
__metadata('design:paramtypes', [angularfire2_1.AngularFire])
], TermsService);
return TermsService;
}());
exports.TermsService = TermsService;
var SectorsService = (function () {
function SectorsService(config, af) {
this.config = config;
this.af = af;
}
SectorsService.prototype.getSectors = function () {
return this.af.database.list(this.config.baseUrls.sectors);
};
SectorsService.prototype.getSector = function (id) {
return this.af.database.object(this.config.baseUrls.sectors + "/" + id);
};
SectorsService = __decorate([
core_1.Injectable(),
__param(0, core_1.Inject(index_1.APP_CONFIG)),
__metadata('design:paramtypes', [Object, angularfire2_1.AngularFire])
], SectorsService);
return SectorsService;
}());
exports.SectorsService = SectorsService;
var StockService = (function () {
function StockService(af) {
this.af = af;
}
StockService.prototype.getStockExchanges = function () {
return this.af.database.list('stock-exchanges');
};
StockService.prototype.getStockExchange = function (symbol) {
return this.af.database.object("stock-exchanges/" + symbol);
};
StockService.prototype.updategetStockExchange = function (stockFirebaesObject, update) {
stockFirebaesObject.update(update);
};
StockService = __decorate([
core_1.Injectable(),
__metadata('design:paramtypes', [angularfire2_1.AngularFire])
], StockService);
return StockService;
}());
exports.StockService = StockService;
var AppComponent = (function () {
function AppComponent(af) {
this.item = af.database.object('/item');
//this.add("hello Pakitan");
}
AppComponent.prototype.add = function (value) {
this.item.set({ name: value });
};
AppComponent = __decorate([
core_1.Component({
selector: 'my-app',
template: "\n <h1>{{ (item | async)?.name }}</h1>\n ",
}),
__metadata('design:paramtypes', [angularfire2_1.AngularFire])
], AppComponent);
return AppComponent;
}());
exports.AppComponent = AppComponent;