| 'use strict'; | |
| /** | |
| * @ngdoc function | |
| * @name datasprocketApp.controller:MainCtrl | |
| * @description | |
| * # MainCtrl | |
| * Controller of the datasprocketApp | |
| */ | |
| angular.module('datasprocketApp') | |
| .config(['LoopBackResourceProvider', function(LoopBackResourceProvider) { | |
| LoopBackResourceProvider.setUrlBase('http://localhost:3000/api'); | |
| }]) | |
| .controller('EditTable', ['$scope', '$routeParams', 'Registereddb', function ($scope, $routeParams, Registereddb) { | |
| Registereddb.get({ | |
| id: $routeParams.id | |
| }, function (data) { | |
| $scope.selectedtable = data; | |
| }); | |
| // fetch data for table | |
| Registereddb.fetchdata({ | |
| id:$routeParams.id | |
| }, function(fetchdata) { | |
| $scope.userdata = fetchdata.data.userdata; | |
| $scope.schema = fetchdata.data.schema; | |
| //console.log(fetchdata.data.schema); | |
| }); | |
| $scope.compareField = function(thisfield, fieldtype) { | |
| //console.log(thisfield + ' ' + fieldtype); | |
| if (thisfield === fieldtype) { return true; } | |
| }; | |
| } | |
| ]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment