How do I show different modal data on each subjects displayed? - loops

How do I show different modal data on each subjects displayed?
My Problem: Showing same modal data on each subjects displayed.
My blade view
#section('content')
<!-- Main content -->
<section class="content" style="background-color:#fff; padding-bottom:50px;" id="subjects">
<div class="subjects-content">
<h3>List of Subjects</h3>
<div class="box-body box-self-evaluation" v-show="subjects.length > 0">
<table id="example2" class="table table-hover table-striped sortable">
<thead>
<tr>
<th>Subject Area</th>
<th>Course Title</th>
<th>Failed</th>
<th>View more</th>
</tr>
</thead>
#foreach ($all_subjects as $subject)
<tbody>
<tr>
<td>
<span> {{ $subject->subject_code }}</span>
</td>
<td>
<span> {{ $subject->description }} </span>
</td>
<td>
<span> {{ $subject->grade()->where('grade','F')->count() }} </span>
</td>
<td><span> <div class="btn btn-crimson btn-inline-block" data-toggle="modal" data-target="#myModal">View more info</div> </span></td>
</tr>
</tbody>
#endforeach
</table>
</div>
<div class="confirmation-buttons-self-evaluation">
<div class="btn btn-blueviolet btn-inline-block btn-create">Go to Self-Evaluation Page</div>
</div>
#foreach ($all_subjects as $subject)
<!--MODAL -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- MODAL content -->
<div class="modal-content" style="width:70%; margin:0 auto; margin-top:100px; max-height: calc(100vh - 210px); overflow-y: auto;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Subject: {{ $subject->subject_code }}</h4>
</div>
<div class="modal-body" style="padding-top:0">
<center>
<table class="table">
<thead>
<th colspan="3" style="text-align:center">List of Disgraceful Students</th>
</thead>
<thead class="failed-header">
<th>Section: <span style="color:#000"> CS <!-- SECTION --> </span></th>
<th>Professor: <span style="color:#000"> John Doe <!-- PROF --> </span></th>
<th>Failed: <span style="color:#000"> 2 <!-- NUMBER OF FAILED SA SECTION --> </span></th>
</thead>
<tbody>
<tr>
<td><img src="{{ asset('dist/img/default.png')}}" class="img-square" alt="User Image" style="height:50px; width:50px"></td>
<td style="padding-top: 20px" colspan="2"> John Jashuel </td>
</tr>
<tr>
<td><img src="{{ asset('dist/img/default.png')}}" class="img-square" alt="User Image" style="height:50px; width:50px"></td>
<td style="padding-top: 20px" colspan="2"> John Caezar </td>
</tr>
</tbody>
</center>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
<!-- /. modal content-->
#endforeach
</section>
#endsection
what is wrong with my code?
how do I solve this?
help me please...
any suggestion or comments are well appreciated thank you!

try to change
data-target="#myModal"
to
data-target="#{{$subject->id}}"
and id in <--modal-->
From
id="myModal"
to
id="{{$subject->id}}"

Related

AngularJS; error when registering a controller

I'm not too familiar with Angular; I'm trying to use a controller and keep getting this error:
Error: [$controller:ctrlreg] The controller with the name 'MyControllerTest' is not registered.
This is what I put in the html file:
<script type="text/javascript">
var app = angular.module('myAppTest', []);
app.controller('MyControllerTest', function($scope) {
$scope.message = 'Test Message';
});
</script>
<div ng-app="myAppTest">
<div ng-controller="MyControllerTest">
{{message}}
</div>
</div>
I don't have full access to the entire system, I can either edit the html file or add code to the header tag. I tried moving the script section to the header tag with the same result. The site is using AngularJS v1.8.2 Any help would be appreciated!
The entire HTML snippet I'm trying to add this to is:
<style>
.product-details-page {
overflow: auto;
margin-left: 0 !important;
}
.product-details-page .modalContent {
height:auto;
}
#media only screen and (max-width : 986px) {
.product-details-page-image img, product-details-page-content {
width: 100%;
}
.product-details-page {
width:auto;
}
}
</style>
<div class="{{modalClass}} product-details-page" ng-cts-product-page-view="PageView_ProductDetails IncludeOnPage_ProductDetails">
<div class="modal-header product-details-page-header">
<div class="close" ng-show="EnableCloseOrBack()">
<a ng-click='CloseDialog()' href="javascript:" ><span aria-hidden="true" class="icon-cross"></span></a>
</div>
<div class="back" ng-show="(data.IsScreenSizeLimited && data.ConfirmationButtonAction == 2)" ng-show="EnableCloseOrBack()">
<a ng-click="loadKitPage()" href="javascript:" ><span aria-hidden="true" class="icon-arrow-left2"></span></a>
</div>
<div>
<span ng-show="(product!=null && product!=undefined)">{{product._Name}}</span>
<span ng-hide="(product!=null && product!=undefined)">{{getLocalizedString("ProductDetails.ProductUnavailable")}}</span>
</div>
</div>
<div class="modalContent" ng-show="(product!=null && product!=undefined)" ng-style="setProductDetailsHeight(windowHeight)">
<div class="product-details-page-image">
<img ng-src="{{product._DetailImageKey}}" alt="" ng-show="product._DetailImageKey" />
<img src='Images/no-image.png' alt="" ng-hide="product._DetailImageKey" />
</div>
<div class="product-details-page-content">
<div ng-show="product._ShowInventory" class="product-details-inventory">
<span>{{getStringWithVariableData(getLocalizedString("Product.DetailedInventoryCount"),[product._InventoryRemainingDisplay])}}</span>
</div>
<div ng-show="product._ShowPreviewLink" class="product-preview-link">
<span class="label" ng-localize="Shared.Preview"></span>
</div>
<div class="product-details-page-sku">
<span>{{getLocalizedString('Webpart.ProductDisplayItemNo')}}</span><span> {{product._SKU}} </span>
</div>
<div class="product-details-page-description">
<span ng-bind-html-unsafe="product._Description"></span>
</div>
<!-- add product pricing -->
<div ng-show="product._SKU == 'PRO-XXX'">
<!-- gives controller registration error -->
<script type="text/javascript">
var app = angular.module('myAppTest', []);
app.controller('MyControllerTest', function($scope) {
$scope.message = 'Test Message';
});
</script>
<div ng-app = "myAppTest">
<div ng-controller="MyControllerTest">
{{message}}
</div>
</div>
<!-- gives controller registration error -->
<table width="100%" cellpadding="10" cellspacing="0" border="0" ng-show="ShowPricing" class="product-price-matrix">
<thead>
<th><span>Test Quantity</span></th>
<th><span>Test Quantity Pricing</span></th>
</thead>
<tbody>
<tr ng-repeat="price in product.PricingDetails_asArray[0].PricingDetail_asArray">
<td><span> {{price.QtyRange}} </span></td>
<td><span> {{price.FormattedPrice}} </span></td>
</tr>
</tbody>
</table>
</div>
<!-- add product pricing -->
<div class="product-details-page-description">
<span ng-bind-html-unsafe="product._LongDescription"></span>
</div>
<!-- Added for customer 9 for preview links -->
<div ng-show="product._ShowExternalBuyerPreviewLink" class="product-preview-link">
<span class="label" ng-localize="Customer9.ExternalBuyerPreviewMessage"></span>
</div>
<!-- Added for customer 9 for new product alerts -->
<div ng-show="product._ShowIsNew" class="product-details-page-description">
<span ng-localize="Customer9.IsNewBuyerAlert"></span>
</div>
<div class="product-details-page-uom" ng-show="(product._IsSoundToBegin)">
<span ng-show="EnablePricingByUnitOfMeasure && product._UnitsOfMeasure !=undefined && product._UnitsOfMeasure.length>0">{{getLocalizedString("Pricing.OrderUnit")}}:</span>
<span title="{{product._UnitsOfMeasure}}" ng-bind-html-unsafe="product._UnitsOfMeasure"></span>
</div>
<div class="product-details-page-price" ng-show="(EnableRRDCustomization && ShowPricingToBuyer && ShowUnitPrice)">
<span>{{product._UnitPrice}}</span>
</div>
<div class="product-details-page-turn-around" ng-show="product._ShowTurnaround">
<span>{{getLocalizedString('AdHocBottomProductDetail.ProductDetails.TurnAroundTime') + product._Turnaround}}</span>
</div>
<table width="100%" cellpadding="10" cellspacing="0" border="0" ng-show="ShowMatrix" class="product-price-matrix">
<tbody>
<tr>
<td></td>
<td class="product-preview-link"><a ng-click='ResetFiltersAndProductMatrix()' href="javascript:"><span class="label" ng-localize="ManageApprovalSetings.ResetFilters"></span></a></td>
</tr>
<tr ng-repeat="Attribute in Currentproductmatrix">
<td><span> {{Attribute._DisplayName}}:</span></td>
<td><select ng-options="AttributeValue._DisplayName for AttributeValue in Attribute.AttributeValue_asArray | filter : FilterProductMatrix(Attribute.AttributeValue_asArray)" ng-change='DispLayProductMatrix(Attribute.AttributeValue,Attribute)' ng-model="Attribute.AttributeValue"></select></td>
</tr>
<tr ng-show="ShowMatrix && SubAttributes.ShowSubAttribute && ShowSubAttribute(product)">
<td><span>{{SubAttributes.SubAttributeName}}</span></td>
<td>
<input required="required" title="{{SubAttributes.SubAttributeName}}" type="text" ng-validate="{{SubAttributes.Validation}}" id="subAttributeNameValue" maxlength="200" ng-model="SubAttributes.SubAttributeValue">
<span class='validator-hint' id='hintValidatorsubAttributeNameValue' style="display: none;"></span>
</td>
</tr>
</tbody>
</table>
<div ng-show="ShowMatrix" class="product-details-page-description" style="margin-top: 10px;">
<span>{{getLocalizedString('Mobile.OrderLineItem.ProductName')}}:</span><span> {{product.DisplayName}} </span>
</div>
<table style="border:none !important">
<tr ng-show="data.ShowDeliverablesControl(product)">
<td style="border:none !important">
<label ng-localize="Deliverables" style="padding-right: 5px">##Deliverables</label>
</td>
<td style="border:none !important">
<label ng-show="(data.ConfirmationButtonAction==2 && isProductDetailsOpenFromKitToSelect)" style="padding-right: 5px"> : {{SelectedBuyerDelivarable.label}}</label>
<select ng-hide="(data.ConfirmationButtonAction==2 && isProductDetailsOpenFromKitToSelect)" ng-model="SelectedBuyerDelivarable" ng-change="deliverableChange()" ng-options="SelectedBuyerDelivarable.label for SelectedBuyerDelivarable in BuyerDelivarable"></select>
</td>
</tr>
<tr ng-show="ShowQuantityControl(product)">
<td>
<label for="" ng-localize="CatalogItemDetailsControl.Qty">##Qty</label>
</td>
<td>
<ng-quantity-control quantity="product.Quantity" selectedquantity="product.selectedquantity" isdownloadonly="IsDownloadOnly" registervalidationcallback="RegisterChildValidationControlCallbackFunction(CallbackFuncPointer,UniqueRef)"
registerclearquantitycallback="RegisterClearQuantityCallbackFunction(CallbackFuncPointer,UniqueRef)" uniquereference="data.currentProduct._CatalogItemID" onselectedvaluechange="OnProductSelectedQuantityChanged(UniqueIdentifier, Quantity)" includezeroquantity="false"
inventoryremaining="{{product._InventoryRemaining}}" displayerrorsonhover="false" allowbuyertoeditmultiplequantity="product._AllowBuyerToEditQuantity" group="product"></ng-quantity-control>
</td>
</tr>
</table>
<div ng-show="product.ShowReferenceCodes">
<span class="section-header" style="display: block;" ng-localize="Shared.CheckOutRefCode">reference</span></span>
<select ng-model="product.RefrenceCode" style="width: 95%;" id="{{product._CatalogItemID}}ProductDetails" ng-validate="{{product.Validations}}" ng-change="setrefernce(product)"
ng-options="RefrenceCode._Description group by RefrenceCode.group for RefrenceCode in product.ReferenceCodes"></select>
</div>
<div class="product-error-message" ng-hide="product._IsSoundToBegin">
<span title="{{product._CantBeginReason}}">{{getCantBeginReasonMessage(product)}}</span>
</div>
<div class="product-error-message" ng-show="data.isEditingByApprover && product._ApproverEditAllowed != 'true'">
<span>{{product._CantEditReason}}</span>
</div>
<div id="productErrorContainer" class="validation-container" style="display: none;width:100%;margin-top: 10px;margin-bottom: 10px">
<div class="validation-header">
<span class="icon-warning-sign"></span><span class="validaiton-info" ng-localize="inputerror"></span>
</div>
</div>
<table width="100%" cellpadding="10" cellspacing="0" border="0" ng-show="ShowPricing" class="product-price-matrix">
<thead>
<th><span ng-localize="Shared.Quantity"></span></th>
<th><span ng-localize="Webpart.ProductDisplayQuantityPricing"></span></th>
</thead>
<tbody>
<tr ng-repeat="price in product.PricingDetails_asArray[0].PricingDetail_asArray">
<td><span> {{price.QtyRange}} </span></td>
<td><span> {{price.FormattedPrice}} </span></td>
</tr>
</tbody>
</table>
<div ng-show="product._TaxAuthorityUsed">
<small>{{product._TaxAuthorityUsed}}</small>
</div>
</div>
</div>
<div class="modal-footer">
<div class="product-details-page-actions" ng-show="ShowFooter">
<button ng-class="{true:'btn',false:'btn disabled'}[product._IsSoundToBegin=='true']" type='submit' ng-click="openProductDialog('/ProductCustomization',product,0)" ng-hide="IsInCartUpdateMode || IsReadOnlyPunchOutSession">
<span id="" class="ng-binding" ng-hide="product._ProductType=='10'">{{product._BuyNowButtonText}} </span>
<span id="" class="ng-binding" ng-show="product._ProductType=='10'">{{getLocalizedString('Saepio.Design')}} </span>
</button>
<button class="btn btn-secondary" type='submit' ng-click="returnToPrevious()" ng-hide="IsInCartUpdateMode || IsLevelTwoPunchOut" ng-localize="ShoppingCart.ContinueShopping">
##Continue Shopping
</button>
<button ng-class="{true:'btn',false:'btn disabled'}[(data.isEditingByApprover ? (product._ApproverEditAllowed == 'true') : 'true')]" type='submit' ng-click="openProductDialog('/ProductCustomization',product,0)" ng-localize="Shared.Update" ng-show="IsInCartUpdateMode && !IsLevelTwoPunchOut">
<span id="" class="ng-binding" ng-localize="Shared.Update"></span>
</button>
</div>
<div class="product-details-page-actions" ng-hide="ShowFooter">
<button class="btn btn-secondary" type='submit' ng-click="CloseDialog()" ng-localize="Shared.Close" ng-hide="IsLevelTwoPunchOut" >
<span id="" class="ng-binding" ng-localize="Shared.Cancel"></span>
</button>
</div>
</div>
</div>

Angular - Fill table of items by checked checkbox from another table

I need when the addOrder button is pressed, the elements selected by the checkbox are added to the modal dialog table.
I think an option is to create an array, and through ng-repeat fill the other table, but I do not know how to do it.
Restaurant table
<!DOCTYPE html>
<div>
<table class="table table-condensed table-hover">
<thead>
<tr>
<th>#Código
</th>
<th>Descripción
</th>
<th>Precio
</th>
<th>Cantidad
</th>
</tr>
</thead>
<tbody id="restaurant_table">
<tr ng-repeat="product in object">
<td>
<span ng-bind="product.idProducto"></span>
</td>
<td>
<span ng-bind="product.descripcionProducto"></span>
</td>
<td>
<span ng-bind="(product.precioProducto | currency:'₡')"></span>
</td>
<td>
<div class="input-group">
<input ng-model="product.cantidadProducto" type="text" class="form-control" min="0" value="1" />
</div>
</td>
<td>
<input type="checkbox" ng-checked="addItem(product);">
</td>
</tr>
</tbody>
</table>
<!--addOrder button-->
<button ng-click="addOrder();" type="button" class="btn btn-success" data-toggle="modal" data-target="#new-order-modal">Add</button>
</div>
addItem method (ng-checked).
I need to add multiple elements
$scope.elements = {};
$scope.addItem = function (product) {
$scope.elements.push({
id: product.idProducto,
descripcion: product.descProducto,
cantidad: product.cantidadProducto,
precio: product.precioProducto
});
addOrder method.
Fill table of modal dialog with elements {}. How can I do it?
$scope.addOrder = function () {
//code
};
Order Modal dialog table
<!DOCTYPE html>
<div id="new-order-modal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" aria-hidden="true" data-dismiss="modal">×</button>
</div>
<div class="modal-body">
<table>
<thead>
<tr>
<th>Id</th>
<th>Producto</th>
<th>Cantidad</th>
<th>Costo</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in elements">
<td>{{item.id}}</td>
<td>{{item.descipcion}}</td>
<td>{{item.cantidad}}</td>
<td>{{item.precio| currency:"₡"}}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Confirm</button>
</div>
</div>
</div>
</div>
There is a working order add example for you.. Simply use that logic.
var app = angular.module("app", []);
function Product(id, descProducto, cantidadProducto, precioProducto)
{
this.idProducto = id;
this.descProducto = descProducto;
this.cantidadProducto = cantidadProducto;
this.precioProducto = precioProducto;
}
app.controller("ctrl", function($scope)
{
$scope.orderlist = [];
$scope.myProducts = [];
//adding random products
for(var i = 0; i < 10; i++ )
{
$scope.myProducts.push(new Product(i, "product"+i, "cantidal"+i, "precio"+i))
}
//adds checked items to orderlist
$scope.addOrder = function() {
this.orderlist = [];
for(var i = 0; i < this.myProducts.length; i++ )
{
if(this.myProducts[i].checked == true)
{
this.orderlist.push(angular.extend({},this.myProducts[i]));
}
}
};
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<!DOCTYPE html>
<html>
<body ng-app="app" ng-controller="ctrl" >
<div>
<table class="table table-condensed table-hover">
<thead>
<tr>
<th>#Código
</th>
<th>Descripción
</th>
<th>Precio
</th>
<th>Cantidad
</th>
</tr>
</thead>
<tbody id="restaurant_table">
<tr ng-repeat="product in myProducts track by $index">
<td>
<span ng-bind="product.idProducto"></span>
</td>
<td>
<span ng-bind="product.descripcionProducto"></span>
</td>
<td>
<span ng-bind="(product.precioProducto | currency:'₡')"></span>
</td>
<td>
<div class="input-group">
<input ng-model="product.cantidadProducto" type="text" class="form-control" min="0" value="1" />
</div>
</td>
<td>
<input type="checkbox" ng-model="product.checked">
</td>
</tr>
</tbody>
</table>
<!--addOrder button-->
<button ng-click="addOrder();" type="button" class="btn btn-success" data-toggle="modal" data-target="#new-order-modal">Add</button>
</div>
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" aria-hidden="true" data-dismiss="modal">×</button>
</div>
<div class="modal-body">
<table>
<thead>
<tr>
<th>Id</th>
<th>Producto</th>
<th>Cantidad</th>
<th>Costo</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in orderlist track by $index">
<td>{{item.idProducto}}</td>
<td>{{item.descProducto}}</td>
<td>{{item.cantidadProducto}}</td>
<td>{{item.precioProducto| currency:"₡"}}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Confirm</button>
</div>
</div>
</div>
</div>
</body>
</html>

Pass values of ng-repeat outside it as parameters on button click

I have the following code structure where inside a modal-popup, I've populated rows of a table using ng-repeat. Now I want to pass the values of 3 columns of all the rows to the controller but I dont know how exactly I would be able to use the data outside ng-repeat scope and pass to the controller. Here's my code snippet -
<div class="inmodal">
<div class="modal-header" ng-model="modalDetails">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="cancel()">×</button>
<img ng-src={{$root.varImg}} class="m-b-md" alt="profile">
<h4 class="modal-title">{{$root.assetGrpNm}}</h4>
</div>
<div class="modal-body" >
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-lg-12">
<div class="table-responsive">
<div ng-repeat="dataag in detail.outerData" >
<table class="table table-striped table-bordered table-hover">
<thead>
<!-- --------- I tried using this piece of code thinking that atleast the values would be inside ng-repeat scope
<tr><button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="save(deviceId,dataDeviceData.measurementData,newDeviceValue,dataDeviceData.lastReadingDateTime)">Save</button></tr>
-->
<tr>
<th>Id</th>
<th>Name</th>
<th>Last Value</th>
<th>Current Value</th>
<th>Date Time</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="dataDevice in dataag.innerData track by $index">
<td>
<span style="font-weight: 800;"><span ng-model="deviceId">{{dataDevice.managedDeviceInfo.id}}</span> - {{dataDevice.managedDeviceInfo.deviceExternalId}}</span>
</td>
<td ng-repeat="dataDeviceData in dataDevice.deviceCoreData">{{dataDevice.managedDeviceInfo.deviceName }} - <span class="text-center">({{ dataDeviceData.quantityUnitSymbol }})</span></td>
<td ng-repeat="dataDeviceData in dataDevice.deviceCoreData">
<input type="number" class="form-control" id="modal_val" ng-model="dataDeviceData.measurementData" required style="width: 100px;"></td>
<td ng-repeat="dataDeviceData in dataDevice.deviceCoreData">
<input type="number" class="form-control" id="modal_val" ng-model="newDeviceValue" required style="width: 100px;"></td>
<td style="position: relative;">
<div id="datetimepicker1-{{$index}}" class="input-append date">
<input data-format="dd/MM/yyyy hh:mm:ss" type="text" ng-model="dataDeviceData.lastReadingDateTime"></input>
<span class="add-on"><i data-time-icon="icon-time" data-date-icon="icon-calendar"></i></span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="save(deviceId,dataDeviceData.measurementData,newDeviceValue,dataDeviceData.lastReadingDateTime)">Save</button>
<button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="ok()">Cancel</button>
</div>
</div>
Below is an image showing the logic -

Table is not scrolling inside collection-repeat on android device

I have a problem of scrolling table horizontally inside the collection-repeat and i don't find the solution. Scrolling is working fine on web browser but it does not work on actual android device.
The code is given below
<ion-content>
<ion-refresher on-refresh="doRefresh()"></ion-refresher>
<div class="list">
<div class="item" collection-repeat="lists in list"
item-height="getItemHeight(lists, $index)"
ng-style="{height:getItemHeight(lists, $index)}">
<h2 style="text-align: center;" class="padding">{{lists.name}}</h2>
<p class="text-center padding">
<img ng-src="{{lists.link}}" width="200px" height"250px">
</p>
<div class="padding">
<ion-scroll direction="x" class="wide-as-needed">
<table class="table1">
<tr>
<th>size
</th>
<th>unit
</th>
<th>box packing
</th>
<th>type
</th>
<th>price
</th>
</tr>
<tr ng-repeat="company in lists.array">
<td>{{company.size}}
</td>
<td>{{company.unit}}
</td>
<td>{{company.packing}}
</td>
<td>{{company.type}}
</td>
<td>{{company.price}}
</td>
</tr>
</table>
</ion-scroll>
</div>
</div>
</div>
</ion-content>
<ion-content>
<ion-refresher on-refresh="doRefresh()"></ion-refresher>
<div class="list">
<div class="item" collection-repeat="lists in list"
item-height="getItemHeight(lists, $index)"
ng-style="{height:getItemHeight(lists, $index)}">
<h2 style="text-align: center;" class="padding">{{lists.name}}</h2>
<p class="text-center padding">
<img ng-src="{{lists.link}}" width="200px" height"250px">
</p>
<div class="card">
<ion-item>
<ion-scroll direction="x" class="wide-as-needed" zooming="false"
overflow-scroll="false" style="width: 100%; height:100%">
<table class="table1">
<tr>
<th>size
</th>
<th>unit
</th>
<th>box packing
</th>
<th>type
</th>
<th>price
</th>
</tr>
<tr ng-repeat="company in lists.array">
<td>{{company.size}}
</td>
<td>{{company.unit}}
</td>
<td>{{company.packing}}
</td>
<td>{{company.type}}
</td>
<td>{{company.price}}
</td>
</tr>
</table>
</ion-scroll>
</ion-item>
</div>
</div>
</div>
</ion-content>

Infinite Scroll in angular UI Modal

I am trying to use infinite scroll in a angular UI modal and the modal is defined in ng-template as shown below
<script type="text/ng-template" id="someID" >
<div infinite-scroll="loadMoreEmployees()" infinite-scroll-distance="1">
<div class="modal-header">
<div class="vertical-margin row">
<div class="col-lg-12">
<h2 class="help-block">Departments assign</h2>
</div>
</div>
</div>
<div class="modal-body">
<div class="content-container">
<div class="col-lg-12 col-md-12 simple-data-table-content">
<table data-ng-if="vm.employees!=null || vm.employees.length!=0" class="table table-condensed text-center clear-bottom">
<tbody>
<tr>
<th>Employee No</th>
<th>Employee Name</th>
<th>Email</th>
<th data-ng-repeat="DeptType in vm.DeptTypes track by $index">{{DeptType.name}}</th>
<th></th>
</tr>
<tr data-ng-if="vm.employees==null || vm.employees.length==0"><td colspan="{{vm.DeptTypes.length + 4}}"></td></tr>
<tr data-ng-repeat="employee in vm.employees | limitTo:vm.loadEmployeeLimitCount" data-ng-if="vm.employees!=null && vm.employees.length > 0">
<td class="">{{employee.employeeNumber}}</td>
<td class="">{{employee.name}}</td>
<td class="">{{employee.email}}</td>
<td class="" data-ng-repeat="DeptType in vm.DeptTypes">
<input type="text" only-digits data-ng-model="employee.DeptSummary[DeptType.id]" style="width:50px;" min="1" />
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
But infinite scroll as does not respond to scroll action, please point out where I am wrong.

Resources