I'm trying to load some information in the html page, i tried to insert a 
function init on the js file that get the info by the $http variable but i 
can't make it work.

This is the html file:


<div class="page page-invoice" data-ng-controller="invoiceCtrl" >
>
>     <div class="invoice-wrapper">
>         <section class="invoice-container" id="invoice">
>
>             <div class="invoice-inner">
>                 <div class="row">
>                     <div class="col-xs-6">
>                         <p class="size-h1">Facturas</p>
>                     </div>
>                     <div class="col-xs-6 text-right">
>                         Lisa Doe <br>
>                         PO Box 21177 <br>
>                         MELBOURNE VIC 8011 <br>
>                         Austria                        
>                     </div>
>                 </div>
>
>                 <hr>
>
>                 <div class="row">
>                     <div class="col-xs-6">
>                         <p><strong>Factura a:</strong></p>
>                         {{encabezado_cliente}} <br>
>                         {{encabezado_nit}} <br>
>                         {{encabezado_tip_doc}} <br>
>                         {{encabezado_doc}} <br>
>
>                     </div>
>                     <div class="col-xs-6 text-right">
>                         <p><strong>Detalle:</strong></p>
>                         <strong>Fecha:</strong> {{encabezado_fecha}} <br>
>                         <strong>NĂºmero de factura:</strong> 
> {{encabezado_num_fac}} <br>
>                         <strong>Importe pendiente:</strong> $ 
> {{encabezado_valor}}
>                     </div>            
>                 </div>
>
>                 <div class="divider divider-lg"></div>
>
>                 <table class="table table-bordered table-striped">
>                     <thead>
>                         <tr class="bg-dark">
>                             <th class="text-center">#</th>
>                             <th>Product</th>
>                             <th class="text-center">Unit Cost</th>
>                             <th class="text-center">Quantity</th>
>                             <th class="text-center">Total</th>
>                         </tr>
>                     </thead>
>                     <tbody>
>                         <tr>
>                             <td class="text-center">1</td>
>                             <td>Product One</td>
>                             <td class="text-center">100</td>
>                             <td class="text-center">1</td>
>                             <td class="text-center">100</td>
>                         </tr>
>                         <tr>
>                             <td class="text-center">2</td>
>                             <td>Product Two</td>
>                             <td class="text-center">550</td>
>                             <td class="text-center">2</td>
>                             <td class="text-center">1100</td>
>                         </tr>
>                         <tr>
>                             <td class="text-center">3</td>
>                             <td>Product Three</td>
>                             <td class="text-center">320</td>
>                             <td class="text-center">2</td>
>                             <td class="text-center">640</td>
>                         </tr>
>                         <tr>
>                             <td class="text-center">4</td>
>                             <td>Product Four</td>
>                             <td class="text-center">80</td>
>                             <td class="text-center">5</td>
>                             <td class="text-center">400</td>
>                         </tr>
>                         <tr>
>                             <td class="text-center">5</td>
>                             <td>Product Five</td>
>                             <td class="text-center">90</td>
>                             <td class="text-center">4</td>
>                             <td class="text-center">360</td>
>                         </tr>
>                         <tr>
>                             <td class="text-center">6</td>
>                             <td>Product Six</td>
>                             <td class="text-center">35</td>
>                             <td class="text-center">4</td>
>                             <td class="text-center">140</td>
>                         </tr>
>                     </tbody>
>                 </table>
>
>                 <div class="row">
>                     <div class="col-xs-8">
>                         <p class="size-h3">Thanks for your business</p>
>                         <ul>
>                             <li>Aeserunt tenetur cum nihil repudiandae 
> perferendis fuga vitae corporis!</li>
>                             <li>Laborum, necessitatibus recusandae ullam at 
> iusto dolore.</li>
>                             <li>Voluptatum aperiam voluptates quasi!</li>
>                             <li>Assumenda, iusto, consequuntur corporis atque 
> culpa saepe magnam recusandae</li>
>                             <li>Possimus odio ipsam magni sint reiciendis 
> unde amet</li>
>                         </ul>
>                     </div>
>                     <div class="col-xs-4 invoice-sum text-right">
>                         <ul class="list-unstyled">
>                             <li>Sub - Total amount: $ 2740</li>
>                             <li>Discount: -----</li>
>                             <li>Tax (12%): $300</li>
>                             <li><strong>Grand Total: $ 3040</strong></li>
>                         </ul>
>                     </div>            
>                 </div>
>             </div>
>         </section>
>
>         <section class="text-center no-print">
>             <a ui-wave href="" ng-click="printInvoice()" class="btn 
> btn-primary btn-raised btn-lg btn-w-lg"><i class="fa fa-print"></i> Print</a>
>         </section>
>     </div></div>
>
>
And this is the js file:

https://drive.google.com/file/d/0B6-tOds6wxusWDc3Y0dqemh0UTA/view?usp=sharing
The code that i insert into the js file are the 2 last functions, but i can 
not make it work, i would like that you can help me up. Is for a university 
work. 

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to