I have a problem: i have list of tags, and i can add tags. for add tags a use modal
and i ng repeat my list of tag. but when i add a tags, i see it on my console.log, but he dont be print on my ng repeat :
my code :
$scope.createTag = function () {
apiREST.execute('POST', "ctrl", "tag",{datas: $scope.tag}, function (error) {
if(error == true){
Growl.error({title: 'ERROR', text: 'Need name value'});
}else{
Growl.success({title: "Success !", text: "Tag successfuly created !"});
}
$scope.getTags();
}, );
};
$scope.getTags = function() {
apiREST.execute("GET","ctrl","tag",{},
function (data) {
$scope.tags = data.TAGS;
console.log($scope.tags); // i see my new tag
},
function () {
console.log("error");
});
};
and my view
<div class="col-md-8 text-bold">
Tags
<br>
<i class="text-danger"> click on tags for select </i>
</div>
<div class="col-md-2 text-bold">
<button class="btn btn-info" id="" ng-click="openModalTagg();">
Add Tags
</button></div>
</div>
<br>
<div class="tagCss">
<span ng-repeat="ctc in tags" >
<button class="btn btn-primary tag" style="margin-top: 20px; font-size: 12px;" id='{{ctc.id_tag}}' ng-click="selectTag()" >{{ctc.name_tag}}</button>
</span>
</div>
Ty for your help