angular ng-repeat

by boneskull

HTML

<div ng-app>
    <div ng-controller="MyCntrl">
        <ul>
            <li ng-repeat="key in orderedLabels()">{{labels[key]}}</li>
        </ul>
    </div>
</div>

JavaScript

function MyCntrl($scope) {

        $scope.labels = {
            "is_operating_revenue": "operating revenue",
                "is_total_revenue": "total revenue",
                "is_adjustments_to_revenue": "adjustments to revenue",
                "is_cost_of_sales": "cost of sales",
                "is_cost_of_sales_with_depreciation": "cost of sales with depreciation",
                "is_gross_margin": "gross margin",
                "is_gross_operating_profit": "gross operating profit",
                "is_RD": "Research & Development (R&D) Expense",
                "is_SGA": "Selling, General & Administrative (SG&A) Expense",
                "is_advertising": "advertising",
                "is_operating_income": "operating income",
                "is_EBITDA": "EBITDA",
                "is_depreciation": "depreciation",
                "is_depreciation_two": "depreciation",
                "is_amortization": "amortization",
                "is_amortization_two": "amortization",
                "is_amortization_of_intangibles": "amortization of intangibles",
                "is_interest_income": "interest income",
                "is_earnings_from_equity_interest": "earnings from equity interest",
                "is_other_income_net": "other income net",
                "is_income_acquired_in_process_ra": "income, acquired in process r&a",
                "is_Income_Restructuring_and_MA": "Income, Restructuring and M&A",
                "is_other_special_charges": "other special charges",
                "is_special_income_charges": "special income charges",
                "is_EBIT": "EBIT",
                "is_interest_expense": "interest expense",
                "is_income_taxes": "income taxes",
                "is_minority_interest": "minority interest",
                "is_pref_securities_of_subsid_trust": "pref. securities of subsid. trust",
                "is_income_before_income_taxes": "income before income taxes",
               ...