A
A
andrei_stefanuk2016-02-23 13:59:30
JavaScript
andrei_stefanuk, 2016-02-23 13:59:30

How to insert javascript inside javascript?

How to insert a JS payment button inside text/ng-template ?

<body>
  <div ng-controller="ModalDemoCtrl">
    <script type="text/ng-template" id="myModalContent.html">
      <div class="modal-header">
        <h3 class="modal-title">Dish</h3>
      </div>
      <div class="modal-body">
<div id="checkoutForm">




<!-- нужно вставить эту кнопку --> 

    <script  src="https://checkout.pay.g2a.com/index/checkout"

            data-id="000000000000000000"

            data-key="00000000000000000000000"

            data-email="00000000000000000"

            data-amount="dish.price"

            data-currency="EUR"

            data-order-id="1"

            description="dish.description"

            data-items[0][sku]="VIRT"

            data-items[0][id]="1"

            data-items[0][name]="dish.name"

            data-items[0][amount]="dish.price"

            data-items[0][qty]="1"

            data-items[0][price]="dish.price"

            data-items[0][extra]="1"

            data-items[0][url]="dish.url"

            data-url-ok="http://test.store.org"

            data-url-failure="http://test.store.org">

    </script>
<!-- нужно вставить эту кнопку --> 



</div>
      </div>
      <div class="modal-footer">
        <button class="btn btn-primary" type="button" ng-click="ok()">OK</button>
        <button class="btn btn-warning" type="button" ng-click="cancel()">Cancel</button>
      </div>
    </script>
    <div class="container">
      <div ng-repeat="dish in dishes">
        <button type="button" class="btn btn-default form-control" ng-click="open(dish)">{{dish.name}} {{dish.count}}</button>
      </div>
    </div>
  </div>
</body>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question