title: accessing angularjs scope variables and assigning it to script tag attributes in html
body: <p>I have some data stored in controller as scope variables and want to assign them to the attributes of a script tag which is implemented in html and used for payment gateway.</p>
  
  <p>following are the scope variables:</p>
  
  <pre><code>$scope.selectedPlan = plan;
  </code></pre>
  
  <p>here the selectedPlan is array of objects of data with following values :</p>
  
  <pre><code>plan_id: 3
  plan_name: "Basic"
  price: "30"
  validity_text: "30 days"
  </code></pre>
  
  <p>need to access some of above values like price in a script tag which is implemented in html file. Following is the code for script tag:</p>
  
  <pre><code>&lt;script
                  src="https://checkout.stripe.com/checkout.js" class="stripe-button"
                  data-key="pk_test_ghxvjhdasfwdadsd"
                  data-amount="{{selectedPlan.price}}*100"
                  data-name="Amazing Test"
                  data-description="Amt: $ {{selectedPlan.price}}"
                  data-image="http://test.com/assets/Images/globe.png"&gt;
                &lt;/script&gt;
  </code></pre>
  
  <p>Here in above written code the selectedplan is the scope object of controller and price attribute needs to be assigned to the data-amount and data-description attribute of script tag. As i am new to angularjs dont know how to implement it.</p>
  
  <p>Please help me achieve what i want.</p>