Does AngularJS have any good tutorials on how to create a simple grid? -
i have following coded knockout:
<form action='/someserversidehandler'> <p>you have asked <span data-bind='text: citys().length'> </span> city(s)</p> <table data-bind='visible: citys().length > 0'> <thead> <tr> <th>id</th> <th>name</th> <th /> </tr> </thead> <tbody data-bind='foreach: citys'> <tr> <td> <input class='required' data-bind='value: cityid' /></td> <td> <input class='required' data-bind='value: name' /></td> <td> <input class='required' data-bind='value: description' /></td> <td><a href='#' data-bind='click: $root.removegift'>delete</a></td> </tr> </tbody> </table> <button data-bind='click: addcity'>add city</button> <button data-bind='enable: citys().length > 0' type='submit'>submit</button> </form> i move angularjs not sure start. can see it's simple grid. it's need. don't need complexity of ng-grid.
has seen tutorials or example of simple grids use me convert above angularjs grid?
one more small question. looked using ng-grid things put me off using size , fact required jquery. know happens if don't have jquery, still work? what's minimum size of ng-grid. noticed 1 download saying 800k !
converting knockout angular extremely easy. pretty use same concepts in view.
here same html ( above ) converted angular.
<form action='/someserversidehandler'> <p>you have asked {{citys.length}} city(s)</p> <table ng-show="citys.length > 0"> <thead> <tr> <th>id</th> <th>name</th> <th /> </tr> </thead> <tbody> <tr ng-repeat="city in citys"> <td> <input class='required' ng-model="city.cityid" /></td> <td> <input class='required' ng-model="city.name" /></td> <td> <input class='required' ng-model="city.description" /></td> <td><a href='#' ng-click="removegift()">delete</a></td> </tr> </tbody> </table> <button ng-click="addcity()">add city</button> <button ng-disable="!citys.length" type='submit'>submit</button> </form>
Comments
Post a Comment