Last active
November 12, 2016 04:29
-
-
Save narenaryan/40d2729489e329940a8d793dab1ebcae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Angular JS code | |
| var app = angular.module('website', []) | |
| app.service('dataService', function() { | |
| this.UIData = { | |
| BorderedTable: [[ | |
| "index.html", | |
| 1266, | |
| 32.3 % , | |
| 321.33 | |
| ], [ | |
| "about.html", | |
| 261, | |
| 33.3 % , | |
| 234.12 | |
| ]], | |
| BorderedWithStrippedTable: [[ | |
| "index.html", | |
| 1266, | |
| 32.3 % , | |
| 321.33 | |
| ], [ | |
| "about.html", | |
| 261, | |
| 33.3 % , | |
| 234.12 | |
| ]], | |
| BasicTable: [[ | |
| "index.html", | |
| 1266, | |
| 32.3 % , | |
| 321.33 | |
| ], [ | |
| "about.html", | |
| 261, | |
| 33.3 % , | |
| 234.12 | |
| ]], | |
| StripedRowsTable: [[ | |
| "index.html", | |
| 1266, | |
| 32.3 % , | |
| 321.33 | |
| ], [ | |
| "about.html", | |
| 261, | |
| 33.3 % , | |
| 234.12]] | |
| } | |
| }); | |
| app.controller('MainController', function($scope, dataService) { | |
| $scope.data = dataService.UIData; | |
| $scope.addBorderedTableRow = function(data){ | |
| $scope.data.BorderedTable.push(data); | |
| } | |
| // Similarly define another handlers | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment