Hi Currently my main intention of the question is avoid displaying large data in the . So instead of that I want to display the data in the ne
You can do the same thing with below steps:
Note: New window won't work in the plunker. So you have to try this in realtime in your local.
I have updated the same in the following plunker link,
https://plnkr.co/edit/lQ92O3?p=preview
Step 1: Change your Step 2: Add two methods in your controller as below Step 3: Create a new page Recommendation: Instead of new window you can try a modal dialog with jquery dialog (or) other dialogs as below
{{list._id.$id}}
{{list.OPERATION}}
{{list.STATUS}}
{{shortText(list.DATA)}}
var app = angular.module('studentApp', []);
app.controller('StudentCntrl', function($scope,$http, $window) {
$http.get('data.json').then(function (response){
console.log(response.data.pages);
$scope.opMessageLogs = response.data
});
$scope.shortText = function(data) {
if(data && data.length > 20) {
return data.substring(0, 20) + '..';
}
return data;
};
$scope.showText = function(data, index) {
var $popup = $window.open("Popup.html", "popup" + index, "width=250,height=100,left=10,top=150");
$popup.data = data;
};
});
Popup.html and add below html