I am using AngularJS to populate my select options content dynamically from an array of objects in my controller. My objects has a property named userProfileName
Do this :)
In your controller :
function myCtrl ($scope) {
$scope.userProfiles = [
{id: 10, name: 'Carton'},
{id: 27, name: 'Bernard'},
{id: 39, name: 'Julie'},
];
$scope.selectedUserProfile= $scope.userProfiles[0]; // Set by default the value "carton"
};
In your page :
CodePen: http://codepen.io/anon/pen/qdOGVB