After retrieving data from a PHP database, I have it formatted in AngularJS as follows:
stuff=
[
{name:'stuff1', id:'1'},
{name:'stuff2', id:'2'},
{name:'stuff3', id:'3'},
{name:'stuff4', id:'4'}
];
Now, I need to include this data in a select element that is stored in the templateCache.
-code-
.run(['$templateCache',function($templateCache,$scope){
$templateCache.put('/dialogs/editUser.html',
-code-
+'<select data-ng-options="s.name for s in stuff" data-ng-model="selected_s"> </select>'
-code-
}])
I am utilizing the angular-dialog-service by m-e-conroy to create a custom dialog box.
The goal is to present a dialog where users can edit something by selecting an item from 'stuff'. However, I am struggling to achieve this functionality. If anyone has a suggestion or guidance on how to make this work, please let me know. The current code does not throw any errors, but the select element remains empty.