Started smart table component
diff --git a/views/ngXosLib/xosHelpers/spec/ui/smart-table.test.js b/views/ngXosLib/xosHelpers/spec/ui/smart-table.test.js
new file mode 100644
index 0000000..95b7d4b
--- /dev/null
+++ b/views/ngXosLib/xosHelpers/spec/ui/smart-table.test.js
@@ -0,0 +1,55 @@
+/**
+ * © OpenCORD
+ *
+ * Created by teone on 3/24/16.
+ */
+
+(function () {
+ 'use strict';
+
+ describe('The xos.helper module', function(){
+ describe('The xos-smart-table component', () => {
+
+ let spy, scope, isolatedScope, element;
+
+ beforeEach(module('xos.helpers'));
+
+ // mock the service
+ beforeEach(function(){
+ module(function($provide){
+ $provide.service('MockResource', function(){
+ this.test = (msg) => console.log(msg);
+ this.query = jasmine.createSpy('add')
+ .and.returnValue({$promise: cb => {
+ console.log('------------------ CB ------------------');
+ return cb([]);
+ }});
+ });
+ });
+ })
+
+ beforeEach(inject(function ($compile, $rootScope, MockResource) {
+ scope = $rootScope.$new();
+
+ scope.config = {
+ resource: 'MockResource'
+ };
+
+ spy = MockResource;
+ // console.log(MockResource.query.toString(), spy.query.toString());
+
+ element = angular.element('<xos-smart-table config="config"></xos-smart-table>');
+ $compile(element)(scope);
+ scope.$digest();
+ isolatedScope = element.isolateScope().vm;
+ }));
+
+ it('should query elements', () => {
+
+ console.log(spy.query.toString());
+ expect(spy.query).toHaveBeenCalled();
+ });
+
+ });
+ });
+})();
\ No newline at end of file
diff --git a/views/ngXosLib/xosHelpers/src/ui_components/smartComponents/smartTable/smartTable.component.js b/views/ngXosLib/xosHelpers/src/ui_components/smartComponents/smartTable/smartTable.component.js
index 3feeb4a..b8b5915 100644
--- a/views/ngXosLib/xosHelpers/src/ui_components/smartComponents/smartTable/smartTable.component.js
+++ b/views/ngXosLib/xosHelpers/src/ui_components/smartComponents/smartTable/smartTable.component.js
@@ -57,9 +57,11 @@
let Resource = $injector.get(this.config.resource);
+ console.log('query', Resource.query.toString(), Resource.test(`I'm Alive!`));
+
Resource.query().$promise
.then((res) => {
-
+ console.log('Data!!');
let props = Object.keys(res[0]);
_.remove(props, p => {