I want to update the data and show them on the other page

   <div class="col-sm-4">
            <div class="form-group">
                <label class="settinglabel">Name</label>
                <input type="text" maxlength="20" class="form-control" ng-model="data.name">
            </div>
        </div>
        <div class="col-sm-3" style="margin-bottom: 4px;">                     
            
myApp.controller('SampleFormatCntrl', ['$scope', '$http', '$rootScope', 'localStorageService', '$q', 'CommonhttpService', function ($scope, $http,  $routeParams, $rootScope, localStorageService, $q, CommonhttpService) {

    var id = $routeParams.id;
    $scope.data = localStorageService.get("formatdata");
    $scope.action = $routeParams.action;
        if ($scope.action == 'Edit' || $scope.action == 'Copy') {
            $scope.action = "Update"
        }

    $scope.tinyArray = [];
    $scope.screenshot = function () {
        $scope.tinyArray.push({
            "id": $scope.data.id,
            "Name": $scope.data.name,
            "content": $scope.data.content,
            "thumbnail": $scope.data.thumbnail,
        });

    }

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.