Skip to content

Instantly share code, notes, and snippets.

@derwolfe
Last active December 28, 2015 03:18
Show Gist options
  • Select an option

  • Save derwolfe/7433741 to your computer and use it in GitHub Desktop.

Select an option

Save derwolfe/7433741 to your computer and use it in GitHub Desktop.
.directive('sides', function () {
return {
// this seems to solve the problem - don't use link, use a built in controller.
controller: function ($scope) {//, elem, attrs) {
$scope.sides = [
{ Name: 'Buy', Id: 1 },
{ Name: 'Sell', Id: -1 }
];
$scope.side = $scope.sides[0];
},
restrict: 'A',
templateUrl: '/JS/partials/side.tmpl.html'
};
})
<div class="yearMenu">
<select id="yearListBox"
ng-model="year"
ng-options="year for year in years">
</select>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment