In my view file I've one button. I want to append drop down on click of button. Here is my code:
Controller File
$scope.appendnewrow = function (result) {
var tr = '<select><option ng-repeat="'+site in
result+'">'+site.name+'</option></select>';
var temp = $compile(tr)($scope);
angular.element(document.getElementById('123')).append(temp);
}
View File
<a ng-click="appendnewrow(result)">Add domain</a>
When I ran this code options did not populate.