Permalink
Comparing changes
Open a pull request
- 7 commits
- 55 files changed
- 0 commit comments
- 1 contributor
Commits on Dec 10, 2014
Binding to both for the same event causes issues for the grid menu as touch-enabled browsers will fire touch events as well as mouse events subsequently. NOTE: PhantomJS provides touch events though you wouldn't expect it. I've updated the header-cell test specs to allow choosing which sort of event types to trigger.
Unified
Split
Showing
with
197 additions
and 98 deletions.
- +6 −2 lib/test/jquery.simulate.js
- +1 −1 misc/tutorial/101_intro.ngdoc
- +1 −1 misc/tutorial/102_sorting.ngdoc
- +1 −1 misc/tutorial/103_filtering.ngdoc
- +1 −1 misc/tutorial/104_i18n.ngdoc
- +1 −1 misc/tutorial/105_footer.ngdoc
- +1 −1 misc/tutorial/106_binding.ngdoc
- +1 −1 misc/tutorial/108_hidden_grids.ngdoc
- +1 −1 misc/tutorial/109_multiple_grids.ngdoc
- +1 −1 misc/tutorial/110_grid_in_modal.ngdoc
- +1 −1 misc/tutorial/111_cellClass.ngdoc
- +1 −1 misc/tutorial/112_swapping_data.ngdoc
- +1 −1 misc/tutorial/113_adding_and_removing_columns.ngdoc
- +1 −1 misc/tutorial/114_row_header.ngdoc
- +1 −1 misc/tutorial/115_headerCellClass.ngdoc
- +1 −1 misc/tutorial/120_RTL.ngdoc
- +1 −1 misc/tutorial/190_large_dataset.ngdoc
- +1 −1 misc/tutorial/191_horizontal_scrolling.ngdoc
- +1 −1 misc/tutorial/201_editable.ngdoc
- +1 −1 misc/tutorial/202_cellnav.ngdoc
- +1 −1 misc/tutorial/203_pinning.ngdoc
- +1 −1 misc/tutorial/204_column_resizing.ngdoc
- +1 −1 misc/tutorial/205_row_editable.ngdoc
- +1 −1 misc/tutorial/206_exporting_data.ngdoc
- +1 −1 misc/tutorial/207_importing_data.ngdoc
- +1 −1 misc/tutorial/210_selection.ngdoc
- +1 −1 misc/tutorial/211_two_grids.ngdoc
- +1 −1 misc/tutorial/212_infinite_scroll.ngdoc
- +1 −1 misc/tutorial/213_auto_resizing.ngdoc
- +1 −1 misc/tutorial/214_pagination.ngdoc
- +1 −1 misc/tutorial/215_paging.ngdoc
- +1 −1 misc/tutorial/301_custom_row_template.ngdoc
- +1 −1 misc/tutorial/301_editableOnFocus.ngdoc
- +1 −1 misc/tutorial/302_custom_header.ngdoc
- +1 −1 misc/tutorial/303_customizing_column_menu.ngdoc
- +1 −1 misc/tutorial/304_grid_menu.ngdoc
- +12 −5 misc/tutorial/305_externalScopes.ngdoc
- +1 −1 misc/tutorial/306_expandable_grid.ngdoc
- +1 −1 misc/tutorial/307_external_sorting.ngdoc
- +1 −1 misc/tutorial/308_external_filtering.ngdoc
- +1 −1 misc/tutorial/309_editable_with_cellnav.ngdoc
- +1 −1 misc/tutorial/310_column_moving.ngdoc
- +1 −1 misc/tutorial/311_importing_data_with_rowedit.ngdoc
- +1 −1 misc/tutorial/312_exporting_data_complex.ngdoc
- +1 −1 misc/tutorial/313_custom_interpolation_symbols.ngdoc
- +1 −1 misc/tutorial/314_external_paging.ngdoc
- +1 −1 misc/tutorial/401_AllFeatures.ngdoc
- +1 −1 misc/tutorial/402_GridIsScrolling.ngdoc
- +39 −4 src/features/edit/js/gridEdit.js
- +26 −13 src/features/resize-columns/js/ui-grid-column-resizer.js
- +22 −9 src/features/resize-columns/test/resizeColumns.spec.js
- +24 −12 src/js/core/directives/ui-grid-header-cell.js
- +1 −1 src/js/core/directives/ui-grid-render-container.js
- +1 −1 src/templates/ui-grid/uiGridHeaderCell.html
- +20 −5 test/unit/core/directives/ui-grid-header-cell.spec.js
| @@ -12,7 +12,8 @@ | ||
| ;(function( $, undefined ) { | ||
|
|
||
| var rkeyEvent = /^key/, | ||
| rmouseEvent = /^(?:mouse|contextmenu)|click/; | ||
| rmouseEvent = /^(?:mouse|contextmenu)|click/, | ||
| rtouchEvent = /^touch/; | ||
|
|
||
| $.fn.simulate = function( type, options ) { | ||
| return this.each(function() { | ||
| @@ -82,13 +83,16 @@ $.extend( $.simulate.prototype, { | ||
| if ( rmouseEvent.test( type ) ) { | ||
| return this.mouseEvent( type, options ); | ||
| } | ||
| else if ( rtouchEvent.test( type) ) { | ||
| return this.mouseEvent( type, options ); | ||
| } | ||
| }, | ||
|
|
||
| mouseEvent: function( type, options ) { | ||
| var event, eventDoc, doc, body; | ||
| options = $.extend({ | ||
| bubbles: true, | ||
| cancelable: (type !== "mousemove"), | ||
| cancelable: (type !== "mousemove" && type !== "touchmove"), | ||
| view: window, | ||
| detail: 0, | ||
| screenX: 0, | ||
| @@ -66,7 +66,7 @@ Steps: | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', function ($scope) { | ||
|
|
||
| @@ -24,7 +24,7 @@ data has changed by calling `gridApi.core.notifyDataChange( grid, uiGridUtils.da | ||
|
|
||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ngAnimate', 'ui.grid']); | ||
| var app = angular.module('app', ['ngAnimate', 'ngTouch', 'ui.grid']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', 'uiGridConstants', function ($scope, $http, uiGridConstants) { | ||
| $scope.gridOptions1 = { | ||
| @@ -51,7 +51,7 @@ for `filters: [{ term: 'xxx' }]`. See the "age" column below for an example. | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ngAnimate', 'ui.grid']); | ||
| var app = angular.module('app', ['ngAnimate', 'ngTouch', 'ui.grid']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', 'uiGridConstants', function ($scope, $http, uiGridConstants) { | ||
| $scope.gridOptions = { | ||
| @@ -19,7 +19,7 @@ Another option is to use the i18nService and use the setCurrentLang method | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', 'i18nService', '$http', function ($scope, i18nService, $http) { | ||
| $scope.langs = i18nService.getAllLangs(); | ||
| @@ -14,7 +14,7 @@ show the aggregation but without a label. Refer the third column in the example | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope','uiGridConstants', '$http', function ($scope, uiGridConstants, $http) { | ||
| var data = []; | ||
| @@ -19,7 +19,7 @@ MODEL\_COL\_FIELD which will be replaced with row.entity.field. Use MODEL\_COL\ | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid', 'ui.grid.edit']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.edit']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', function ($scope) { | ||
|
|
||
| @@ -43,7 +43,7 @@ It's all up to you. And if you know a better way then please submit it in an iss | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', function ($scope, $http) { | ||
| $scope.hideGrid = true; | ||
| @@ -7,7 +7,7 @@ Using multiple grids on a single page | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', function ($scope, $http) { | ||
| $scope.gridOptions1 = {}; | ||
| @@ -7,7 +7,7 @@ Using a grid in a modal popup | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid']); | ||
|
|
||
| app.controller('MainCtrl', ['$rootScope', '$scope', '$http', 'modal', function ($rootScope, $scope, $http, modal) { | ||
| var myModal = new modal(); | ||
| @@ -9,7 +9,7 @@ In this example, we will override the color and background for the first column | ||
|
|
||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ngAnimate', 'ui.grid']); | ||
| var app = angular.module('app', ['ngAnimate', 'ngTouch', 'ui.grid']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', function ($scope, $http) { | ||
| $scope.gridOptions = { | ||
| @@ -7,7 +7,7 @@ You can swap out data in the grid by simply providing a different reference. | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', function ($scope) { | ||
| $scope.swapData = function() { | ||
| @@ -13,7 +13,7 @@ def properties), and call the notifyDataChange api to force an update. | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ngAnimate', 'ui.grid']); | ||
| var app = angular.module('app', ['ngAnimate', 'ngTouch', 'ui.grid']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', 'uiGridConstants', function ($scope, $http, uiGridConstants) { | ||
| $scope.columns = [{ field: 'name' }, { field: 'gender' }]; | ||
| @@ -8,7 +8,7 @@ You can add a row header column, which goes into the left pinned container | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ngAnimate', 'ui.grid']); | ||
| var app = angular.module('app', ['ngAnimate', 'ngTouch', 'ui.grid']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', function ($scope, $http) { | ||
| $scope.columns = [{ field: 'name' }, { field: 'gender' }]; | ||
| @@ -9,7 +9,7 @@ set the background and foreground color of the header if the sort direction is A | ||
|
|
||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ngAnimate', 'ui.grid']); | ||
| var app = angular.module('app', ['ngAnimate', 'ngTouch', 'ui.grid']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', 'uiGridConstants', function ($scope, $http, uiGridConstants) { | ||
| $scope.gridOptions = { | ||
| @@ -7,7 +7,7 @@ The grid supports RTL languages | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', function ($scope, $http) { | ||
| $scope.gridOptions = { | ||
| @@ -14,7 +14,7 @@ Demonstrates the following: | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', function ($scope, $http) { | ||
| $scope.gridOptions = { }; | ||
| @@ -7,7 +7,7 @@ Demonstrating scrolling with large amount of columns | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$timeout', function ($scope, $timeout) { | ||
| $scope.gridOptions = { | ||
| @@ -62,7 +62,7 @@ $scope.gridOptions.columnDefs = [ | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid', 'ui.grid.edit', 'addressFormatter']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.edit', 'addressFormatter']); | ||
|
|
||
| angular.module('addressFormatter', []).filter('address', function () { | ||
| return function (input) { | ||
| @@ -13,7 +13,7 @@ remembering the state of a page and scrolling back to that position when a user | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid', 'ui.grid.cellNav', 'ui.grid.pinning']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.cellNav', 'ui.grid.pinning']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', '$log', function ($scope, $http, $log) { | ||
| $scope.gridOptions = {}; | ||
| @@ -9,7 +9,7 @@ It is also possible to disable pinning on column level. Note the 'id' column def | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid', 'ui.grid.pinning']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.pinning']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', '$log', function ($scope, $http, $log) { | ||
| $scope.gridOptions = {}; | ||
| @@ -39,7 +39,7 @@ $scope.gridOptions = { | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid', 'ui.grid.resizeColumns']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.resizeColumns']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', function ($scope, $http) { | ||
| $scope.gridOptions = { | ||
| @@ -54,7 +54,7 @@ each save will take 3 seconds to complete. Any row saved with a gender of "male | ||
|
|
||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid', 'ui.grid.edit', 'ui.grid.rowEdit', 'ui.grid.cellNav', 'addressFormatter']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.edit', 'ui.grid.rowEdit', 'ui.grid.cellNav', 'addressFormatter']); | ||
|
|
||
| angular.module('addressFormatter', []).filter('address', function () { | ||
| return function (input) { | ||
| @@ -19,7 +19,7 @@ In this example we use the native grid menu buttons, and we show both the pdf an | ||
|
|
||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ngAnimate', 'ui.grid', 'ui.grid.selection', 'ui.grid.exporter']); | ||
| var app = angular.module('app', ['ngAnimate', 'ngTouch', 'ui.grid', 'ui.grid.selection', 'ui.grid.exporter']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', function ($scope, $http) { | ||
| $scope.gridOptions = { | ||
| @@ -48,7 +48,7 @@ illustrates that doing so is not mandatory). | ||
|
|
||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ngAnimate', 'ui.grid', 'ui.grid.importer']); | ||
| var app = angular.module('app', ['ngAnimate', 'ngTouch', 'ui.grid', 'ui.grid.importer']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', '$interval', function ($scope, $http, $interval) { | ||
| $scope.data = []; | ||
| @@ -41,7 +41,7 @@ Two examples are provided, the first with rowHeaderSelection and multi-select, t | ||
|
|
||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid', 'ui.grid.selection']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.selection']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', '$log', function ($scope, $http, $log) { | ||
| $scope.gridOptions = { | ||
| @@ -8,7 +8,7 @@ each other. | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid', 'ui.grid.selection']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.selection']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', '$log', function ($scope, $http, $log) { | ||
| $scope.gridOptions = {}; | ||
| @@ -13,7 +13,7 @@ Specify percentage when lazy load should trigger: | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid', 'ui.grid.infiniteScroll']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.infiniteScroll']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', '$log', function ($scope, $http, $log) { | ||
| $scope.gridOptions = {}; | ||
| @@ -11,7 +11,7 @@ To use, include the `'ui.grid.autoResize'` module in your angular app's dependen | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid', 'ui.grid.autoResize']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.autoResize']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', '$log', function ($scope, $http, $log) { | ||
| $scope.gridOptions = {}; | ||
| @@ -7,7 +7,7 @@ When pagination is enabled, the data is displayed in pages that can be browsed u | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid', 'ui.grid.pagination']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.pagination']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', function ($scope, $http) { | ||
| $scope.gridOptions = {}; | ||
| @@ -7,7 +7,7 @@ When paging is enabled, the data is displayed in pages that can be browsed using | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid', 'ui.grid.paging']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.paging']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', function ($scope, $http) { | ||
| $scope.gridOptions = { | ||
| @@ -9,7 +9,7 @@ You can use [external scopes](/docs/#/tutorial/202_externalScopes) in your row t | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', '$timeout', '$interval', function ($scope, $http, $timeout, $interval) { | ||
| var start = new Date(); | ||
| @@ -11,7 +11,7 @@ See api docs for default navigation keys and how you can override. | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid', 'ui.grid.edit', 'ui.grid.cellNav']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.edit', 'ui.grid.cellNav']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', function ($scope, $http) { | ||
| $scope.gridOptions = { }; | ||
| @@ -7,7 +7,7 @@ Create a grid almost the same as the most basic one, but with a custom header | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', function ($scope, $http) { | ||
| $scope.gridOptions = { | ||
| @@ -26,7 +26,7 @@ See the example below for usage. | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ngAnimate', 'ui.grid']); | ||
| var app = angular.module('app', ['ngAnimate', 'ngTouch', 'ui.grid']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', 'uiGridConstants', function ($scope, $http, uiGridConstants) { | ||
| $scope.blargh = function() { | ||
| @@ -18,7 +18,7 @@ internationalization function that waits 1 second then prefixes each column with | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid', 'ui.grid.exporter', 'ui.grid.selection']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.exporter', 'ui.grid.selection']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', '$interval', '$q', function ($scope, $http, $interval, $q) { | ||
| var fakeI18n = function( title ){ | ||
| @@ -19,9 +19,9 @@ Then in a template, you access the scope using getExternalScopes() function. | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$log', function ($scope, $log) { | ||
| app.controller('MainCtrl', ['$scope', '$log', '$http', function ($scope, $log, $http) { | ||
|
|
||
| $scope.myViewModel = { | ||
| someProp:'abc', | ||
| @@ -33,12 +33,12 @@ Then in a template, you access the scope using getExternalScopes() function. | ||
| $scope.gridOptions = {}; | ||
|
|
||
| $scope.gridOptions.columnDefs = [ | ||
| { name: 'firstName' }, | ||
| { name: 'lastName'}, | ||
| { name: 'name' }, | ||
| { name: 'gender'}, | ||
| { name: 'ShowScope', | ||
| cellTemplate:'<button class="btn primary" ng-click="getExternalScopes().showMe()">Click Me</button>' } | ||
| ]; | ||
|
|
||
| /* | ||
| $scope.gridOptions.data = [ | ||
| { | ||
| "firstName": "Cox", | ||
| @@ -59,6 +59,13 @@ Then in a template, you access the scope using getExternalScopes() function. | ||
| "employed": false | ||
| } | ||
| ]; | ||
| */ | ||
|
|
||
| $http.get('/data/100.json') | ||
| .success(function(data) { | ||
| $scope.gridOptions.data = data; | ||
| }); | ||
|
|
||
| }]); | ||
| </file> | ||
| <file name="index.html"> | ||
| @@ -33,7 +33,7 @@ SubGrid nesting can be done upto multiple levels. | ||
| @example | ||
| <example module="app"> | ||
| <file name="app.js"> | ||
| var app = angular.module('app', ['ui.grid', 'ui.grid.expandable', 'ui.grid.selection', 'ui.grid.pinning']); | ||
| var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.expandable', 'ui.grid.selection', 'ui.grid.pinning']); | ||
|
|
||
| app.controller('MainCtrl', ['$scope', '$http', '$log', function ($scope, $http, $log) { | ||
| $scope.gridOptions = { | ||
Oops, something went wrong.