input text entered in tags-input returns null value in ionic

Iam working with ionic and i have got a Tags input text box and save button.Whenever i enter a tag in the textbox and click save button the value entered should be saved. This is my controller`

          .controller('SinglePhotoCtrl', function($scope, $stateParams, Friends) 
         {

        var photoDetails = Friends.get($stateParams.friendId);
         $scope.displayphoto = photoDetails.url;

    angular.forEach(photoDetails.tag, function(value)
    {    
    $scope.tags=[value];


      });
      $scope.save = function()
        {

            photoDetails.tag = $scope.tags;
           alert("Saved"); 

        };
  })`

the alert comes and but the value is not saved in photoDetails.tag.

and this is html code:`

 <tags-input ng-model="tags" placeholder="Add Tag" min-length="1" max-length="6"       tags:"sampletag" ></tags-input>
   <button ng-click="save()"> Save Tag</button>

Any suggestions? Thanks in Advance.....