<div ng-app="financiamentoApp" ng-controller="financiamentoController" class="main_financiamentos">
    <h6>Simule um financiamento</h6>

    <form class="form-inline">
        <div class="form-group">

            <div class="input-group">

                <input type="text" name="Entrada" id="Entrada" class="form-control"
                       placeholder="Entrada"
                       ng-model="objForm.entrada"
                       aria-describedby="Entrada"
                       ui-money-mask
                >

                <input type="hidden"
                       name="valor"
                       id="valor_veiculo"
                       ng-model="objForm.valor"
                       class="form-control"
                       ng-init="objForm.valor = '<?= $valor ?>'"
                />


            </div>
        </div>
        <button type="button" class="btn btn-primary" ng-click="calcular()">Simular</button>
    </form>


    <div class="box p-2">
        <div class="carregando_tela" ng-show="carregando">
            <span class="fa fa-spin fa-spinner"></span>
        </div>
        <table class="table table-bordered table-inverse table-responsive" ng-show="exibir_tabela">
            <thead class="thead-inverse">
            <tr>
                <th>Prazo</th>
                <th>Entrada</th>
                <th>Valor financiado</th>
                <th ng-repeat="bn in arrBancos">{{bn.nome}}</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="p in arrPrazos">
                <td scope="row">{{p}}</td>
                <td>{{entrada}}</td>
                <td>{{valor_financiado}}</td>
                <td ng-repeat="b in arrBancos">
                    {{b[p] || '-'}}
                </td>

            </tr>

            </tbody>
        </table>
    </div>
</div>
