I'm trying to implement a partial view to my HTML page where I expand the size of the QR Code that's on screen to make it easier for the user to see whenever they are to click the button showQRPanel.
HTMLPAGE:
<div data-bind="using: DetailsArray">
<table style="padding: 9px; border: 1px solid;" data-bind="foreach: DetailsArray">
<tr style="border: 1px solid;">
<th>Patient</th>
<th>Age</th>
<th>QR</th>
<th>img</th>
<th>Button</th>
</tr>
<tr>
<td data-bind="text: patient"></td>
<td data-bind="text: age"></td>
<td data-bind="text: mobnum"></td>
<!--ko if: mobnum-->
<td><img style="width: 100px; height: 100px;" data-bind="attr: { 'src': '#Url.Action("QrGenerator", "Home")?mobnum_text=' + mobnum }" /></td>
<td><button id="showQRPanel" data-bind="click: $root.ShowPanel">...</button></td>
<!--/ko-->
</tr>
</table>
<!--ko if: ShowPanel-->
#Html.Partial("~/Views/Home/_QRPanel.cshtml")
<!--/ko-->
</div>
Partial View:
<div style="background-color: slategrey; width: 53%;" data-bind="with: $root.DetailsArray">
<h2>Phone Number:</h2>
<img style="width: 100px; height: 100px;" data-bind="attr: { 'src': '#Url.Action("QrGenerator", "Home")?mobnum_text=' + mobnum }" />
</div>
ViewModel:
var viewModel = {
ShowPanel: ko.observable(false),
DetailsArray: ko.observableArray([
{ patient: "niall", age: "13", mobnum: "0793983720"},
{ patient: "jacob", age: "13", mobnum: "07939837332"},
{ patient: "sam", age: "15", mobnum: ""},
])
};
ko.applyBindings(viewModel);
Thanks!
First, I don't think you need the using binding in your div at the top. Please check the documentation for the using binding (https://knockoutjs.com/documentation/with-binding.html).
Second, the bindings in your partial view aren't quite right. The img is trying to bind to mobnum, but you don't have a mobnum property on your viewmodel. Rather, you have one one each of the items in your array, but you haven't told the binding how it knows which one to use.
Third, your click handler on your buttons call the ShowPanel method. However, ShowPanel is an observable, so when you call it, all it does is return it's value, which is ignored by the click handler.
After removing the using: DetailsArray at the top of the HTML page, try this:
Viewmodel:
var viewModel = {
SelectedMobNum: ko.observable(),
ShowPanel: function(item) {
viewModel.SelectedMobNum(this.mobnum);
},
ClosePartialView: function() {
viewModel.SelectedMobNum(null);
},
DetailsArray: ko.observableArray([
{ patient: "niall", age: "13", mobnum: "0793983720"},
{ patient: "jacob", age: "13", mobnum: "07939837332"},
{ patient: "sam", age: "15", mobnum: ""},
])
};
Partial View (noticed I removed the with binding):
<div data-bind="visible: SelectedMobNum">
<h2>Phone Number:</h2>
<img data-bind="attr: { 'src': '#Url.Action("QrGenerator", "Home")?mobnum_text=' + SelectedMobNum() }" />
<button data-bind="click: ClosePartialView">Close</button>
</div>
Related
I am using a Vue.js directive:
https://vue-dragscroll.donfalcon.com/
Which makes a block be grabbed with click when it is overflowed.
As I used it in a table, so I should make the table display block. Everything is OK when I have a lot of fields. But when my fields are two or three, all fields will be shown in the left like first one.
I need to have the fields like the second one.
// import { dragscroll } from 'vue-dragscroll'
var app = new Vue({
el: '#app',
data() {
return {
headers: [
{ name: 'header1', label: 'label1'},
{ name: 'header2', label: 'label2'},
{ name: 'header3', label: 'label3'}
],
values: [
['sample11', 'sample12', 'sample13'],
['sample21', 'sample22', 'sample23'],
['sample31', 'sample32', 'sample33']
]
}
},
directives: {
// dragscroll
}
})
var app = new Vue({
el: '#app2',
data() {
return {
headers: [
{ name: 'header1', label: 'label1'},
{ name: 'header2', label: 'label2'},
{ name: 'header3', label: 'label3'}
],
values: [
['sample11', 'sample12', 'sample13'],
['sample21', 'sample22', 'sample23'],
['sample31', 'sample32', 'sample33']
]
}
},
directives: {
// dragscroll
}
})
div {
background-color: gray;
}
<link type="text/css" rel="stylesheet" href="https://unpkg.com/bootstrap#4.5.3/dist/css/bootstrap.min.css" />
<link type="text/css" rel="stylesheet" href="https://unpkg.com/bootstrap-vue#2.21.2/dist/bootstrap-vue.css" />
<script src="https://unpkg.com/vue#2.6.12/dist/vue.min.js"></script>
<script src="https://unpkg.com/bootstrap-vue#2.21.2/dist/bootstrap-vue.min.js"></script>
<div id="app" class="w-100">
<table
v-dragscroll.x
class="d-block w-100 overflow-auto"
>
<thead>
<tr>
<th v-for="th in headers">{{th.label}}</th>
</tr>
</thead>
<tbody>
<tr v-for="row in values">
<td v-for="value in row">
{{value}}
</td>
</tr>
</tbody>
</table>
</div>
<br />
<div id="app2" style="width: 100%;">
<table
class="w-100 overflow-auto"
>
<thead>
<tr>
<th v-for="th in headers">{{th.label}}</th>
</tr>
</thead>
<tbody>
<tr v-for="row in values">
<td v-for="value in row">
{{value}}
</td>
</tr>
</tbody>
</table>
</div>
How can I have both together?
I'm working on aligning a vegalite graph to the center of the webpage, but I've only been able to get it displaying on the left side.
I have two other graphs that I've been able to place right next to each other, but I'm pretty lost on how to center the first graph.
I'm looking to create something like this:
Graph 1
Graph 2 Graph 3
Here is what I have so far, and it is currently displayed like this:
Graph 1
Graph 2 Graph3
<table>
<thread>
<tr>
<th colspan="2">U.S. Gasoline Retail Prices</th>
</tr>
</thread>
<tr>
<td><div id="vis2" display="block"></div></td>
</tr>
</table>
<br><br>
<table>
<thread>
<tr>
<th colspan="1">Average Annual Consumer Price Index(CPI) for Gasoline</th>
<th colspan="2">Annual Crude Oil Price by Barrel(42 gallons)</th>
</tr>
</thread>
<tr>
<td><div id="vis3"></div></td>
<td><div id="vis4"></div></td>
</tr>
</table>
You can simply add style in your table as width: 100%; and in your div blocks you can use style="display: block;" where you are trying to display the vega chart. Also in your vega spec config, add width: 'container' which will keep the width size as per the parent container.
Refer the below snippet or fiddle:
var yourVlSpec = {
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "A simple bar chart with embedded data.",
"data": {
"values": [{
"a": "A",
"b": 28
}, {
"a": "B",
"b": 55
}, {
"a": "C",
"b": 43
},
{
"a": "D",
"b": 91
}, {
"a": "E",
"b": 81
}, {
"a": "F",
"b": 53
},
{
"a": "G",
"b": 19
}, {
"a": "H",
"b": 87
}, {
"a": "I",
"b": 52
}
]
},
"autosize2": {"contains": "padding", "resize": true, "type": "fit"},
width: 'container',
"mark": "bar",
"encoding": {
"x": {
"field": "a",
"type": "ordinal"
},
"y": {
"field": "b",
"type": "quantitative"
}
}
}
vegaEmbed("#vis2", yourVlSpec, {renderer: 'svg'}).then(res => {
var view = res.view;
//console.log(view.data('source_0'));
});
vegaEmbed("#vis3", yourVlSpec, {renderer: 'svg'}).then(res => {
var view = res.view;
//console.log(view.data('source_0'));
});
vegaEmbed("#vis4", yourVlSpec, {renderer: 'svg'}).then(res => {
var view = res.view;
//console.log(view.data('source_0'));
});
<script src="https://cdn.jsdelivr.net/npm/vega#5.20.2/build/vega.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite#5.0.0/build/vega-lite.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-embed#6.17.0/build/vega-embed.min.js"></script>
<table style="width: 100%;">
<thread>
<tr>
<th colspan="2">U.S. Gasoline Retail Prices</th>
</tr>
</thread>
<tr>
<td><div style="display: block;" id="vis2"></div></td>
</tr>
</table>
<br><br>
<table style="width: 100%;">>
<thread>
<tr>
<th colspan="1">Average Annual Consumer Price Index(CPI) for Gasoline</th>
<th colspan="2">Annual Crude Oil Price by Barrel(42 gallons)</th>
</tr>
</thread>
<tr>
<td><div style="display: block;" id="vis3"></div></td>
<td><div style="display: block;" id="vis4"></div></td>
</tr>
</table>
I would like to extract some JSON data from the following url:
http://weather.news24.com/sa/johannesburg.
I used the Google developer tools which gave me some JSON and when I tried some online JSON validators, it's failing somehow on dates. Is there anyway I can get around the issue and correctly get the selected city JSON data?
Any help will be appreciated.
If the site does not offer a RESful service, then you may need to ask them if you want to scrape their page. Web page scraping is very tedious and the site's DOM structure could change at any time. There is no guarantee.
Page Scraping
You can scrape the page and convert the table data into a JSON object. I copied the DOM of the webpage as a bassis for this implementation.
If you generate the results below, the following response should be at the bottom.
{
"windSpeed": "13km/h",
"windDirection": "NW",
"humidity": "35%",
"dewPoint": "14",
"comfortLevel": "30°C",
"chanceOfRain": "10%",
"sunrise": "5:57AM",
"sunset": "6:45PM",
"moonrise": "6:34PM",
"moonset": "5:30AM",
"moonPhase": "Full moon"
}
Example
// jQuery Plugins
(function($) {
$.reduce = function(arr, fnReduce, valueInitial) {
if (Array.prototype.reduce) {
return Array.prototype.reduce.call(arr, fnReduce, valueInitial);
}
$.each(arr, function(index, value) {
valueInitial = fnReduce.call(null, valueInitial, value, index, arr);
});
return valueInitial;
};
})(jQuery);
// Used to convert a sequence of words to camelCase.
function camelCase(input) {
return input.toLowerCase().replace(/\s(.)/g, function(match, group1) {
return group1.toUpperCase();
});
}
// Main
$(function() {
// Replace relative links with absolute.
$('img').each(function() {
$(this).attr('src', 'http://weather.news24.com/' + $(this).attr('src'));
});
// Find all table rows and grab the key-value pairs.
var data = $.reduce($('#forecastContent tr'), function(map, tr) {
var td = $(tr).find('td'), key, value;
if (td.length === 2) {
key = $(td.get(0)).text();
value = $(td.get(1)).text();
} else if (td.length === 3) {
key = $(td.get(1)).text();
value = $(td.get(2)).text();
}
if (key != null && key.trim().length > 0) {
map[camelCase(key)] = value;
}
return map;
}, {});
$('#response').html(JSON.stringify(data, null, 2));
});
body {
background: #FFF;
}
.bold {
font-weight: bold;
}
.currentConditionsHeader {
color: #1F38B7;
font-weight: bold;
}
.forecast7DayBlockEmbedded {
width: 80px;
height: 70px;
border: 1px solid #EAEFF2;
text-align: center;
padding-top: 10px;
float: left;
white-space: nowrap;
margin-left: 13px;
margin-top: 5px;
margin-bottom: 15px;
font-family: Verdana;
font-size: 10px;
font-weight: bold;
}
.forecastHeading {
color: #000000;
background-color: #D6F1FC;
font-weight: bold;
padding: 3px;
}
#response {
background: #EEE;
display: block;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<div id="forecastContent">
<table cellpadding="0" celspacing="0" border="0">
<tbody>
<tr>
<td>
<div id="divCurrentOne" class="currentConditionsOneTable" style="white-space:nowrap;">
<div class="float-l">
<table cellpadding="2" cellspacing="2" border="0" class="currentConditionsOneTable">
<tbody>
<tr>
<td colspan="2" class="currentConditionsHeader" style="vertical-align:middle;"> <img tyle="vertical-align:middle;" src="/Images/Icons/Forecasts/2.gif">LOW 17°C HIGH 24°C </td>
</tr>
<!-- Provide space and set column widths -->
<tr>
<td style="width:110px;"> </td>
<td style="width:110px;"> </td>
</tr>
<!-- end spacer and width definition row -->
<tr>
<td>Wind Speed</td>
<td class="bold">13km/h</td>
</tr>
<tr>
<td>Wind Direction</td>
<td class="bold">NW</td>
</tr>
<tr>
<td>Humidity</td>
<td class="bold">35%</td>
</tr>
<tr>
<td>Dew Point</td>
<td class="bold">14</td>
</tr>
<tr>
<td>Comfort Level</td>
<td class="bold">30°C</td>
</tr>
<tr>
<td>Chance of Rain</td>
<td class="bold">10%</td>
</tr>
</tbody>
</table>
</div>
</div>
</td>
<td>
<div id="divAstronomy" class="currentConditionsAstronomyTable" style="white-space:nowrap;">
<div class="float-l">
<table cellpadding="2" cellspacing="2" border="0" class="currentConditionsAstronomyTable">
<tbody>
<tr>
<td colspan="3"> </td>
</tr>
<!-- Provide space and set column widths -->
<tr>
<td> </td>
<td> </td>
<td style="width:100%;"> </td>
</tr>
<!-- end spacer and width definition row -->
<tr>
<td> </td>
<td>Sunrise</td>
<td class="bold">5:57AM</td>
</tr>
<tr>
<td> </td>
<td>Sunset</td>
<td class="bold">6:45PM</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td class="bold"> </td>
</tr>
<tr>
<td rowspan="2" class="currentConditionsMoonImage"><img src="/Images/Icons/Moon/cw_full_moon.gif"></td>
<td>Moonrise</td>
<td class="bold">6:34PM</td>
</tr>
<tr>
<td>Moonset</td>
<td class="bold">5:30AM</td>
</tr>
<tr>
<td> </td>
<td>Moon Phase</td>
<td class="bold">Full moon</td>
</tr>
</tbody>
</table>
</div>
</div>
</td>
</tr>
<tr>
<td colspan="2" id="div7DayForecast" style="width:100%;white-space:nowrap;">
<div class="forecast7DayEmbeddedContainer">
<div class="forecast7DayContainer">
<br>
<br>
<div id="7dayforecast" class="forecastHeading">7 Day Forecast</div>
<div class="forecast7DayBlockEmbedded"> Tuesday
<br> <img src="/Images/Icons/Forecasts/2.gif">
<br> 17°C - 27°C </div>
<div class="forecast7DayBlockEmbedded"> Wednesday
<br> <img src="/Images/Icons/Forecasts/33.gif">
<br> 17°C - 28°C </div>
<div class="forecast7DayBlockEmbedded"> Thursday
<br> <img src="/Images/Icons/Forecasts/33.gif">
<br> 16°C - 29°C </div>
<div class="forecast7DayBlockEmbedded"> Friday
<br> <img src="/Images/Icons/Forecasts/33.gif">
<br> 17°C - 28°C </div>
<div class="forecast7DayBlockEmbedded"> Saturday
<br> <img src="/Images/Icons/Forecasts/4.gif">
<br> 16°C - 27°C </div>
<div class="forecast7DayBlockEmbedded"> Sunday
<br> <img src="/Images/Icons/Forecasts/22.gif">
<br> 16°C - 26°C </div>
<div class="forecast7DayBlockEmbedded"> Monday
<br> <img src="/Images/Icons/Forecasts/4.gif">
<br> 15°C - 27°C </div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<hr />
<h2>Response</h2>
<pre>
<code id="response"></code>
</pre>
RESTful Options
There are free REST APIs that return JSON weather data. All you need to do is sign up and receive a key.
OpenWeatherMap
API: http://openweathermap.org/api
Request: http://api.openweathermap.org/data/2.5/weather?q=johannesburg,za&appid=YOUR_KEY
Response
{
coord: {
lon: 28.04,
lat: -26.2
},
weather: [{
id: 801,
main: "Clouds",
description: "few clouds",
icon: "02d"
}],
base: "cmc stations",
main: {
temp: 304.367,
pressure: 852.81,
humidity: 26,
temp_min: 304.367,
temp_max: 304.367,
sea_level: 1022.08,
grnd_level: 852.81
},
wind: {
speed: 2.51,
deg: 296.507
},
clouds: {
all: 20
},
dt: 1456147770,
sys: {
message: 0.0116,
country: "ZA",
sunrise: 1456113434,
sunset: 1456159501
},
id: 993800,
name: "Johannesburg",
cod: 200
}
Weather Underground
API: https://www.wunderground.com/weather/api/
Request: http://api.wunderground.com/api/YOUR_KEY/conditions/q/ZA/Johannesburg.json
Response
{
response: {
version: "0.1",
termsofService: "http://www.wunderground.com/weather/api/d/terms.html",
features: {
conditions: 1
}
},
current_observation: {
image: {
url: "http://icons.wxug.com/graphics/wu2/logo_130x80.png",
title: "Weather Underground",
link: "http://www.wunderground.com"
},
display_location: {
full: "Johannesburg, South Africa",
city: "Johannesburg",
state: "",
state_name: "South Africa",
country: "ZA",
country_iso3166: "ZA",
zip: "00000",
magic: "1",
wmo: "68368",
latitude: "-26.12999916",
longitude: "28.22999954",
elevation: "1700.00000000"
},
observation_location: {
full: "Johannesburg, ",
city: "Johannesburg",
state: "",
country: "ZA",
country_iso3166: "ZA",
latitude: "-26.13077927",
longitude: "28.24378967",
elevation: "5643 ft"
},
estimated: {},
station_id: "FAOR",
observation_time: "Last Updated on February 22, 3:30 PM SAST",
observation_time_rfc822: "Mon, 22 Feb 2016 15:30:00 +0200",
observation_epoch: "1456147800",
local_time_rfc822: "Mon, 22 Feb 2016 15:44:41 +0200",
local_epoch: "1456148681",
local_tz_short: "SAST",
local_tz_long: "Africa/Johannesburg",
local_tz_offset: "+0200",
weather: "Scattered Clouds",
temperature_string: "84 F (29 C)",
temp_f: 84,
temp_c: 29,
relative_humidity: "29%",
wind_string: "From the WNW at 10 MPH",
wind_dir: "WNW",
wind_degrees: 290,
wind_mph: 10,
wind_gust_mph: 0,
wind_kph: 17,
wind_gust_kph: 0,
pressure_mb: "1020",
pressure_in: "30.12",
pressure_trend: "0",
dewpoint_string: "48 F (9 C)",
dewpoint_f: 48,
dewpoint_c: 9,
heat_index_string: "NA",
heat_index_f: "NA",
heat_index_c: "NA",
windchill_string: "NA",
windchill_f: "NA",
windchill_c: "NA",
feelslike_string: "84 F (29 C)",
feelslike_f: "84",
feelslike_c: "29",
visibility_mi: "6.2",
visibility_km: "10.0",
solarradiation: "--",
UV: "6",
precip_1hr_string: "-9999.00 in (-9999.00 mm)",
precip_1hr_in: "-9999.00",
precip_1hr_metric: "--",
precip_today_string: "0.00 in (0.0 mm)",
precip_today_in: "0.00",
precip_today_metric: "0.0",
icon: "partlycloudy",
icon_url: "http://icons.wxug.com/i/c/k/partlycloudy.gif",
forecast_url: "http://www.wunderground.com/global/stations/68368.html",
history_url: "http://www.wunderground.com/history/airport/FAOR/2016/2/22/DailyHistory.html",
ob_url: "http://www.wunderground.com/cgi-bin/findweather/getForecast?query=-26.13077927,28.24378967",
nowcast: ""
}
}
I am looking to make a dynamic table in HTML and for each cell, I want to give a unique ng-model but I didn't know how to do it can anybody tell me how to do it.
<!DOCTYPE html>
<html>
<head>
<style>
table, td {
border: 1px solid black;
}
</style>
</head>
<body>
<table id="myTable">
<tr>
<td>Row1 cell1</td>
<td>Row1 cell2</td>
</tr>
<tr>
<td>Row2 cell1</td>
<td>Row2 cell2</td>
</tr>
<tr>
<td>Row3 cell1</td>
<td>Row3 cell2</td>
</tr>
</table>
<br>
<button onclick="myFunction()">Add row</button>
<script>
function myFunction() {
var table = document.getElementById("myTable");
var row = table.insertRow(0);
var cell1 = row.insertCell(0);
var cell2 = row.insertCell(1);
cell1.innerHTML = "NEW CELL1";
cell2.innerHTML = "NEW CELL2";
}
</script>
</body>
</html>
I made this but did'nt know how to add ng-model .
Not sure what you are looking for but here is what you can do something like this:
angular.module("sa", []).controller('MyCtrl', function($scope) {
$scope.tableData = [{
title: "Foo",
cols: [{
type: "amount",
value: 0
}, {
type: "discount",
value: 0
}, {
type: "title",
value: ""
}]
}, {
title: "Bar",
cols: [{
type: "amount",
value: 0
}, {
type: "discount",
value: 0
}, {
type: "title",
value: ""
}]
}];
});
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<div ng-app="sa" ng-controller="MyCtrl">
<table class="table table-bordered">
<tr ng-repeat="row in tableData">
<td>{{row.title}}
<td ng-repeat="col in row.cols">
{{col.type}}
<input type="text" ng-model="col.value">
</td>
</tr>
</table>
<pre>{{tableData | json}}</pre>
</div>
I am using Angularjs in one of my programme. I am using it to add items to a json array. Then I save this array to a temporary file. Programme is working fine upto this time. When I try to bind saved json string to table I get error Error: [ngRepeat:dupes] Upon searching documentation I found that AngularJS allows duplicate values by syntax "Track by $index" and example is shown to repeat single dimension json. My question is, how can I control my repeater with id
HTML Code
<table>
<thead>
<tr>
<th style="width: 5%; text-align: left;">
Edit
</th>
<th style="width: 5%; text-align: left;">
Dr./Cr.
</th>
<th style="width: 25%; text-align: left;">
G.L. Head
</th>
<th style="width: 25%; text-align: left;">
S.L. Head
</th>
<th style="width: 25%; text-align: left;">
Narration
</th>
<th style="width: 18%; text-align: right;">
Amount
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="TD in TDS track by TD.id">
<td style="width: 5%; text-align: left;">
<button class="btn" ng-click="editTD(TD.id)">
<span class="glyphicon glyphicon-pencil"></span>Edit
</button>
</td>
<td style="width: 5%; text-align: left;">
{{ TD.dbcr }}
</td>
<td style="width: 25%; text-align: left;">
{{ TD.glhead }}
</td>
<td style="width: 25%; text-align: left;">
{{ TD.slhead }}
</td>
<td style="width: 25%; text-align: left;">
{{ TD.narr }}
</td>
<td style="width: 18%; text-align: right;">
{{ TD.amt }}
</td>
</tr>
</tbody>
</table>
jQuery Please note that if I remove $scope.$apply(), no error shows up but data is also not shown.
$scope.OpenTemp = function () {
var vFileName = $("#TempList").val();
$scope.sysmsg = 'Opening voucher from temporary location';
var to = "../../WHS/OpenTempJV.ashx";
var options = {
type: "POST",
url: to,
data: { vFile: vFileName },
error: function () {
ShowErrorMsg("Error in opening temporary voucher");
},
success: function (data) {
if (data != "") {
//alert(data.d);
//$scope.sysmsg = 'success';
$("#divGrid").show();
$scope.TDS = $scope.TDS.concat(data);
//$scope.TDS = data;
//$scope.$apply();
//CalcAllTotals(data);
}
else {
ShowErrorMsg("Could not retrieve temporary voucher");
}
}
};
$.ajax(options);
}
JSON String in data
[
{
"id": 1,
"dbcr": "C",
"glhead": "A B KING PRO EXCERCISER MACHINE AT COST",
"glid": "3",
"slhead": "",
"slid": "0",
"narr": "dfasdf",
"amt": "454",
"$$hashKey": "004"
},
{
"id": 2,
"dbcr": "C",
"glhead": "A.C. AT COST",
"glid": "593",
"slhead": "",
"slid": "0",
"narr": "asdfasdf",
"amt": "32434",
"$$hashKey": "006"
},
{
"id": 3,
"dbcr": "D",
"glhead": "ADD ON COURSES (BOOKS)",
"glid": "6",
"slhead": "",
"slid": "0",
"narr": "asdfasdf",
"amt": "324",
"$$hashKey": "008"
},
{
"id": 4,
"dbcr": "D",
"glhead": "GROUP INSURANCE SCHEME (STUDENTS)",
"glid": "270",
"slhead": "",
"slid": "0",
"narr": "adsfasdfadsf",
"amt": "44324",
"$$hashKey": "00A"
},
{
"id": 5,
"dbcr": "D",
"glhead": "HRA (TEACHING STAFF)",
"glid": "357",
"slhead": "",
"slid": "0",
"narr": "asdfadsfasdfds",
"amt": "11760",
"$$hashKey": "00C"
},
{
"id": 6,
"dbcr": "C",
"glhead": "EXTENSION CONST. OF ADMN. BLOCK BUILDING",
"glid": "267",
"slhead": "",
"slid": "0",
"narr": "adfasdfasdf",
"amt": "23520",
"$$hashKey": "00E"
}
]
Chrome error stack
Error: [ngRepeat:dupes] http://errors.angularjs.org/undefined/ngRepeat/dupes?p0=TD%20in%20TDS%20track%20by%20TD.id&p1=undefined
at Error (native)
at https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js:6:453
at https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js:182:179
at Object.fn (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js:97:409)
at g.$get.g.$digest (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js:98:304)
at g.$get.g.$apply (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js:101:12)
at Object.TDController.options.success (http://localhost:49399/DAV_JV/accounts/transaction/jvAng.js:254:28)
at x.Callbacks.l (http://localhost:49399/DAV_JV/js/jquery.min.js:4:24584)
at Object.x.Callbacks.c.fireWith [as resolveWith] (http://localhost:49399/DAV_JV/js/jquery.min.js:4:25405)
at k (http://localhost:49399/DAV_JV/js/jquery.min.js:6:4709)