Skip to content

Commit

Permalink
feat: example1 now uses ui-grid instead of ng-grid
Browse files Browse the repository at this point in the history
Because ui-grid code contains more unique cases and because it is a replacement of ng-grid.
  • Loading branch information
ocombe committed Nov 2, 2014
1 parent f981c33 commit e7cf1e8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/example1/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"angular-ui-router": "~0.2.10",
"ocModal": "~0.1.6",
"bootstrap": "~3.2.0",
"ng-grid": "2.0.11"
"angular-ui-grid": "~3.0.0-rc.12"
}
}
8 changes: 4 additions & 4 deletions examples/example1/js/AppCtrl.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
angular.module('app').controller('AppCtrl', ['$scope', '$ocLazyLoad', '$timeout', function($scope, $ocLazyLoad, $timeout) {
$scope.$on('ocLazyLoad.moduleLoaded', function(e, module) {
console.log('event module loaded', module);
$scope.$on('ocLazyLoad.moduleLoaded', function(e, params) {
console.log('event module loaded', params);
});
$scope.$on('ocLazyLoad.componentLoaded', function(e, component) {
console.log('event component loaded', component);
$scope.$on('ocLazyLoad.componentLoaded', function(e, params) {
console.log('event component loaded', params);
});
$scope.$on('ocLazyLoad.fileLoaded', function(e, file) {
console.log('event file loaded', file);
Expand Down
6 changes: 3 additions & 3 deletions examples/example1/js/gridModule.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ngGrid is also lazy loaded by $ocLazyLoad thanks to the module dependency injection !
angular.module('gridModule', [{name: 'ngGrid', files: [
'bower_components/ng-grid/ng-grid-2.0.11.debug.js',
'bower_components/ng-grid/ng-grid.css'
angular.module('gridModule', [{name: 'ui.grid.rowEdit', files: [
'bower_components/angular-ui-grid/ui-grid.js',
'bower_components/angular-ui-grid/ui-grid.css'
]}]).controller('GridModuleCtrl', ['$scope', function($scope){
$scope.myData = [{name: "Moroni", age: 50},
{name: "Teancum", age: 43},
Expand Down
2 changes: 1 addition & 1 deletion examples/example1/partials/grid.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script type="text/ng-template" id="gridTemplate">
<div ng-controller="GridModuleCtrl">
<span>{{test}}</span><br/>
<div ng-grid="gridOptions" class="gridStyle"></div>
<div ui-grid="gridOptions" class="gridStyle"></div>
</div>
</script>

0 comments on commit e7cf1e8

Please sign in to comment.