Is there any more code surrounding the portions you've posted?
I've just downloaded the code from the demo page and it's working for a
simple example:
<!doctype html>
<html ng-app="AcuteSelectDemo">
<head>
<meta charset="utf-8" />
<title>acute-select</title>
<link href="acute.select/acute.select.css" rel="stylesheet" />
</head>
<body ng-controller="MainCtrl">
<h1>Acute Select</h1>
<ac-select ac-model="selectedColour" ac-options="c.name for c in colours"
ac-change="colourChanged(value)"></ac-select>
<script src="angular.min.js"></script>
<script src="acute.select/acute.select.js"></script>
<script>
var app = angular.module("AcuteSelectDemo", ['acute.select']);
app.controller("MainCtrl", function ($scope) {
$scope.colours = [
{ name: 'black', id: 0 },
{ name: 'white', id: 1 },
{ name: 'red', id: 2 }
];
$scope.selectedColour = $scope.colours[2]; // red.
$scope.colourChanged = function (value) {
var colourName = value ? value.name : "none";
$scope.message = "ac-change event fired for colour. New colour: " +
colourName;
$scope.$digest();
};
});
</script>
</body>
</html>
Although I do get an [$rootScope:inprog] error when I start to use the drop
down!
Adrian
On 22 October 2014 20:53, Rudy Sanchez <[email protected]> wrote:
> I am trying to use Angular acute-select in my table. I am having a hard
> time making it work. The demo on github is not a plunkr so I can not see to
> much of what is going on. I have no idea how to set this up on a plunkr, I
> am not sure how to do the JSON. I am getting a error with what I go now but
> I believe I am not bringing any data in from the controller. Any help would
> be great. thanks
>
> <tbody>
> <td>
> <select class="ac-select stateList"
> ac-model="currentItem.JobItems[0].JobItemName"
> ac-options="currentItem.JobItems.JobItemName for currentItem in
> getAllJobItems()"
> ac-key="JobItemId" ac-settings="{ initialText: 'Job Items',
> comboMode:true, loadOnOpen: true, minWidth: '300px', allowClear: false }"
> ng-enter="selectJobItem();addRecord()"></select><br />
> </td>
> <td>{{currentItem.JobItems.JobItemDescription}}</td>
> <td>{{currentItem.JobItems.JobItemMatSize}}</td>
> </tr>
> </tbody>
>
>
> //GET Jobs
> $scope.jobArray = {};
> JobGet.query().then(function (data) {
> $scope.jobArray = data;
> }, function (reason) {
> errorMngrSvc.handleError(reason);
> });
>
> // Return All Job Items for select Box
> $scope.getAllJobItems = function (callback) {
> callback($scope.jobArray);
> };
>
> //Bind Selected POD JobItems to table fields
> $scope.currentItem = {};
> $scope.selectJobItem = function (jobItem) {
> $scope.currentItem.JobItems.JobItemName = jobItem.JobItems[0].JobItemName;
> $scope.currentItem.JobItems.JobItemDescription =
> jobItem.JobItems[0].JobItemDescription;
> $scope.currentItem.JobItems.JobItemMatSize =
> jobItem.JobItems[0].JobItemMatSize;
> };
>
>
> Error Message
>
> ac-options and ac-model attributes must be set <div class="ac-select
> stateList ac-select-wrapper ng-isolate-scope" ng-keydown="keyHandler($event)"
> tabindex="999" ac-focus="wrapperFocus" ng-focus="comboFocus = true"
> ac-model="currentItem.JobItems[0].JobItemName"
> ac-options="currentItem.JobItems.JobItemName for currentItem in
> getAllJobItems()" ac-key="JobItemId" ac-settings="{ initialText: 'Job Items',
> comboMode:true, loadOnOpen: true, minWidth: '300px', allowClear: false }"
> ng-enter="selectJobItem();addRecord()">
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.