JSFiddle - React, Tailwind, and code Playground

HTML

<div ng-app='MyModule' ng-controller="MyController">
    <select ng-model="userGroups" 
            ng-options="group.groupId as group.groupName for group in groups">
    </select>
    
    <p>You have selected group: {{userGroups}}</p>
</div>

JavaScript

angular.module('MyModule', [])

.controller('MyController', function( $scope ) {
    
    $scope.groups = [
        {groupId: 1, groupName: 'group 1,group2,group3'},
        {groupId: 2, groupName: 'group 2'},
        {groupId: 3, groupName: 'group 3'},
        {groupId: 4, groupName: 'group 4'},
    ];
        
    $scope.userGroups = 2;
});