How to use the angularfire2.FirebaseListObservable function in angularfire2

To help you get started, we’ve selected a few angularfire2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github JacekKosciesza / InvestSystemsOrg / client / web / app / +glossary / terms-list.component.js View on Github external
var TermsListComponent = (function () {
    function TermsListComponent(termsService, router) {
        this.termsService = termsService;
        this.router = router;
    }
    TermsListComponent.prototype.ngOnInit = function () {
        if (!this.terms) {
            this.terms = this.termsService.getTerms();
        }
    };
    __decorate([
        core_1.Input(), 
        __metadata('design:type', angularfire2_1.FirebaseListObservable)
    ], TermsListComponent.prototype, "terms", void 0);
    TermsListComponent = __decorate([
        core_1.Component({
            moduleId: module.id,
            selector: 'terms-list',
            templateUrl: 'terms-list.component.html'
        }), 
        __metadata('design:paramtypes', [terms_service_1.TermsService, router_1.Router])
    ], TermsListComponent);
    return TermsListComponent;
}());
exports.TermsListComponent = TermsListComponent;
github JacekKosciesza / InvestSystemsOrg / client / web / app / +companies / companies-list.component.js View on Github external
this.router = router;
        this.titleService = titleService;
    }
    CompaniesListComponent.prototype.ngOnInit = function () {
        if (!this.companies) {
            this.companies = this.companiesService.getCompanies();
            this.titleService.setTitle('Companies');
        }
    };
    CompaniesListComponent.prototype.gotoDetail = function (company) {
        var link = ['/companies/', company.$key];
        this.router.navigate(link);
    };
    __decorate([
        core_1.Input(), 
        __metadata('design:type', angularfire2_1.FirebaseListObservable)
    ], CompaniesListComponent.prototype, "companies", void 0);
    CompaniesListComponent = __decorate([
        core_1.Component({
            moduleId: module.id,
            selector: 'companies-list',
            templateUrl: 'companies-list.component.html',
            styleUrls: ['companies-list.component.css'],
            directives: [card_1.MD_CARD_DIRECTIVES]
        }), 
        __metadata('design:paramtypes', [companies_service_1.CompaniesService, router_1.Router, platform_browser_1.Title])
    ], CompaniesListComponent);
    return CompaniesListComponent;
}());
exports.CompaniesListComponent = CompaniesListComponent;