title: AngularJS + ngTable + plunker will not render table correctly
body: <h3>Bakground</h3>
  
  <p>I have a bit of a chicken and egg problem:</p>
  
  <ul>
  <li>I built a <em><a href="http://demo.pennington.net/" rel="nofollow noreferrer">demo webapp</a></em> to illustrate <a href="https://stackoverflow.com/q/22429534/667301">a challenging problem</a> I have with AngularJS + ngTables; however, my webserver logs tell me that nobody really cares about my <a href="http://demo.pennington.net/" rel="nofollow noreferrer">demo webapp</a>, they only want a plunker.</li>
  <li>I even built a <em><a href="http://plnkr.co/edit/fQuZOn" rel="nofollow noreferrer">demo webapp plunker</a></em>; however, the plunker behaves differently than my <a href="http://demo.pennington.net/" rel="nofollow noreferrer">demo webapp</a>.  Thus, this question.</li>
  </ul>
  
  <h3>Question</h3>
  
  <p>Please help me understand why:</p>
  
  <ul>
  <li>My <a href="http://demo.pennington.net/" rel="nofollow noreferrer">demo webapp</a> renders the ngTable from <a href="http://demo.pennington.net/demo/api/v1/data01" rel="nofollow noreferrer">json data</a>, if you type a character in the search box.</li>
  <li>The <a href="http://plnkr.co/edit/fQuZOn" rel="nofollow noreferrer">demo webapp plunker</a> refuses to render the <a href="http://demo.pennington.net/demo/api/v1/data01" rel="nofollow noreferrer">json data</a> at all</li>
  </ul>
  
  <p>I realize plunkers are popular; however, the <a href="http://plnkr.co/edit/fQuZOn" rel="nofollow noreferrer">demo webapp plunker</a> is not helping because I can't get it to behave as my webapp does; I literally copied the HTML straight off my <a href="http://demo.pennington.net/" rel="nofollow noreferrer">demo webapp</a> into <a href="http://plnkr.co/edit/fQuZOn" rel="nofollow noreferrer">the plunker</a>.  Perhaps I am doing something wrong, but I need help understanding what I've done wrong (if anything).</p>
  
  <p><strong>Explicit resolution</strong></p>
  
  <p>I'm using Flask + Python to render the <a href="http://demo.pennington.net/demo/api/v1/data01" rel="nofollow noreferrer">json data</a>... the explicit fix was...</p>
  
  <pre class="lang-python prettyprint-override"><code>from functools import update_wrapper
  from datetime import datetime, timedelta
  from json import dumps
  
  from flask import Response, Flask, redirect, url_for, abort, render_template, flash
  ## Other imports here...
  
  def crossdomain(origin=None, methods=None, headers=None,
                  max_age=21600, attach_to_all=True,
                  automatic_options=True):
      if methods is not None:
          methods = ', '.join(sorted(x.upper() for x in methods))
      if headers is not None and not isinstance(headers, basestring):
          headers = ', '.join(x.upper() for x in headers)
      if not isinstance(origin, basestring):
          origin = ', '.join(origin)
      if isinstance(max_age, timedelta):
          max_age = max_age.total_seconds()
  
      def get_methods():
          if methods is not None:
              return methods
  
          options_resp = current_app.make_default_options_response()
          return options_resp.headers['allow']
  
      def decorator(f):
          def wrapped_function(*args, **kwargs):
              if automatic_options and request.method == 'OPTIONS':
                  resp = current_app.make_default_options_response()
              else:
                  resp = make_response(f(*args, **kwargs))
              if not attach_to_all and request.method != 'OPTIONS':
                  return resp
  
              h = resp.headers
  
              h['Access-Control-Allow-Origin'] = origin
              h['Access-Control-Allow-Methods'] = get_methods()
              h['Access-Control-Max-Age'] = str(max_age)
              if headers is not None:
                  h['Access-Control-Allow-Headers'] = headers
              return resp
  
          f.provide_automatic_options = False
          return update_wrapper(wrapped_function, f)
      return decorator
  
  ### Use @crossdomain() decorator to fix my plunker's ajax request
  @app.route('/demo/api/v1/data01', methods=['GET'])
  @crossdomain(origin='*')
  #@login_required
  def send_all_tasks():
      """Send all tasks back to AngularJS"""
      retval = [
          {'Column02': 'shines', 'Column03': 'paycheck', 'Column01': 'days'},
          {'Column02': 'erg', 'Column03': 'gag', 'Column01': "emotion's"},
          ]
      return Response(dumps(retval), mimetype='application/json')
  </code></pre>