Search code examples
javascriptangularjsangular-ui-gridjsfiddle

Why doesn't my Angular.js fiddle work?


I'm just trying to copy tho example here:

http://ui-grid.info/docs/#!/tutorial/320_complex_grouping

My fiddle is here:

http://jsfiddle.net/92u8jtkd/9/

The HTML code is very simple:

<div ng-controller="MainCtrl">
  <p ng-show="lastChange">Last grouping change: {{ lastChange }}</p>
  <div id="grid1" ui-grid="gridOptions" ui-grid-grouping ui-grid-edit ui-grid-selection class="grid" style="width:100%;"></div>
</div>

It's not working. What am I doing wrong?


Solution

  • I've updated your fiddle and now it works.

    http://jsfiddle.net/92u8jtkd/26/

    You missed two dependencies:

    <script src="http://ui-grid.info/release/ui-grid.js"></script>
    <link rel="stylesheet" type="text/css" href="http://ui-grid.info/release/ui-grid.css">
    

    And the $http.get at the correct path:

    $http.get('http://ui-grid.info/data/500_complex.json')