title: Angular textarea count rows
body: <p>I have a textarea and i want to count the rows and price each row and then add amount to Stripe checkout. </p>
  
  <pre><code>&lt;textarea id="textarea-1" rows="15" maxlenght="540" placeholder="Type or paste text here"&gt;
  &lt;/textarea&gt; 
  </code></pre>
  
  <p>Input</p>
  
  <pre><code>Hello World! 
  
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam
  condimentum metus eget facilisis convallis. Nam facilisis magna quis
  pretium ultricies.
  </code></pre>
  
  <p>Count/output in script</p>
  
  <pre><code>Hello World!
  
  Lorem ipsum dolor sit amet, cons
  ectetur adipiscing elit. Aliquam
  condimentum metus eget facilisis
  convallis. Nam facilisis magnaqu
  is pretium ultricies.
  </code></pre>
  
  <p>Row count should be 7.</p>
  
  <pre><code>var flatFee = '70.00';
  var perRow = '10.00';
  
  function rowController() {
  
    //Textarea as string
    var text = document.getElementById("textarea").value;
  
    //Split string into array with 32 characters in each
    var rowSplit = text.val().split("\n", 32);
      //Count arrays (7)
      console.log(rowSplit.length);
  }
    //Take string array
    var rows = rowSplit.length(this.value);
  
    //Counted arrays and add value
    var additionalFees=0;
      if (count.rows &gt; 2) {
        additionalFees = perRow * (count.rows - 2);
    } 
  
    var amount = parseFloat(flatFee) + parseFloat(additionalFees);
  
    console.log(amount);
  </code></pre>
  
  <p>The final amount should be able to put in stripe variable amount. Thats the general idea anyways. Console is there to see if it counts. </p>
  
  <p>Help is greatly appreciated.</p>