title: Copy array list to another array list
body: <p>I want to copy the below array list </p>
  
  <pre><code>$scope.medicinelist = [
  
  {medicine: 'AMLOPRES 5MG TABLET'},
  {medicine: 'ARGIPREG SACHET'},
  {medicine: 'ALCIPRO 500MG TABLET'} ,
  {medicine: 'PROLOMET AM 50MG TABLET'},
  {medicine: 'PROLOMET AM 5MG TABLET'},
  {medicine: 'AB PHYLLINE 200MG TABLET SR'} ,
  {medicine: 'ACIVIR 800MG TABLET DT'},
  
  {medicine: 'CEPODEM AZ TABLET'},
  {medicine: 'ECOSPRIN AV 10MG CAPSULE'},
  {medicine: 'ECOSPRIN AV 150MG CAPSULE'} ,
  {medicine: 'ATORLIP 40MG TABLET'},
  {medicine: 'AMTAS 5MG TABLET'},
  {medicine: 'ARKAMIN 100MG TABLET'} ,
  {medicine: 'AMPOXIN 500MG INJECTION'} ];
  </code></pre>
  
  <p>to the following array list  </p>
  
  <pre><code> $rootScope.medicinedrop = [
      // {
      //   medicine: 'you try to drop me somewhere'
      // }
  
      ];
  </code></pre>
  
  <p>i am also using $scope.maedicinedrop for drag drop operation from another list, after coping i am loosing that functionality that is not able to drop items into it from another list after copy.</p>
  
  <p>on button press </p>
  
  <pre><code>$scope.copy = function(){
      console.log($scope.pastprescription)
      $scope.medicinedrop.unshift($scope.pastprescriptions.medicine);
  
       }
  </code></pre>
  
  <p>but after pressing putton it just show blank that in console data is copied but not displayed.</p>
  
  <p>for drag drop i am using dragular as:</p>
  
  <pre><code>dragularService([containerLeft_Medicine], {
        containersModel: [$scope.allmedicines],
        copy: true,
        //move only from left to right  
        accepts: accepts
      });
  
      dragularService([containerRight_Medicine], {
        containersModel: [$scope.medicinedrop],
        removeOnSpill: true,
        //move only from left to right  
        accepts: accepts
      });
  </code></pre>
  
  <p>ejs file for it is as :</p>
  
  <pre><code>&lt;input class="form-control" type="text" ng-repeat="medicine_name in medicinedrop"
            value="{{medicine_name.medicine}}" /&gt; 
  </code></pre>