index.html http://pastie.org/10777655
app.js http://pastie.org/10777651
I am new to angularjs. Can anybody please solve this problem? Please reload the pastie url if it does not works.
index.html http://pastie.org/10777655
app.js http://pastie.org/10777651
I am new to angularjs. Can anybody please solve this problem? Please reload the pastie url if it does not works.
Looking after ngCsv documentation found errors in your application.
1) ngCsv module has dependency of ngSanitize which you not included.
2) ng-csv="getArray()" Could be an expression, a value or a promise. But in your case i think something wrong.
var app = angular.module('mainApp',['ngSanitize','ngCsv']);
app.controller('myCtrl',function($scope,$http){
var endpoint = 'http://localhost:8080';
$scope.show_table = true;
$scope.ShowSearchTab= true;
$scope.hideTable = function(){
$scope.show_table = false;
};
$scope.ClickShow = function(){
$scope.ShowSearchTab = true;
};
$scope.test = [
{'companyname':'Company 1', 'streetaddress':'Address 1', 'executive':'exe 1', 'webaddress':'www.example1.com', 'dunsno':'xxx', 'leadid':'yyy'},
{'companyname':'Company 2', 'streetaddress':'Address 2', 'executive':'exe 2', 'webaddress':'www.example2.com', 'dunsno':'xxx', 'leadid':'yyy'},
{'companyname':'Company 3', 'streetaddress':'Address 3', 'executive':'exe 3', 'webaddress':'www.example3.com', 'dunsno':'xxx', 'leadid':'yyy'},
{'companyname':'Company 4', 'streetaddress':'Address 4', 'executive':'exe 4', 'webaddress':'www.example4.com', 'dunsno':'xxx', 'leadid':'yyy'}
]
$scope.getArray = function(){
return $scope.test;
}
});
Working Plunkr is here https://plnkr.co/edit/K5l3snujJ3GQtPyjRJLZ?p=preview