Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • j0w 31 posts 202 karma points
    Aug 14, 2019 @ 18:28
    j0w
    0

    reaload entire page on action

    Hey there !

    Still working on a custom extension for umbraco. Is there a way to reload the current page after doing an action? Something like F5 would do...

    Tried this :

    surveyPluginResource.addGroupeQuestions($scope.questionnaire.Id, $scope.newGroupeQuestions).then(
                function(response) {
    
                    $scope.questionnaire = response.data;
                    navigationService.syncTree({ tree: 'survey', path: [-1, -1], forceReload: true }).then(
                        function(syncArgs) {
                            navigationService.reloadNode(syncArgs.node);
                            $route.reload();
    
                        });
                });
    

    But my new groupe Question is inserted at the top of the page, and if I refresh, it goes back to the end of the page. Somehow disturbing for end user I guess :D

  • Paul Seal 524 posts 2889 karma points MVP 7x c-trib
    Aug 20, 2019 @ 22:46
    Paul Seal
    100

    Hi Fant0hm

    You should be able to achieve this with:

    window.location.reload(true);
    

    You could also do it like this:

    $location.path('content/content/edit/' + editorState.current.id);
    

    Just make sure you pass in $location and editorState to the constructor for the controller.

    Kind regards

    Paul

  • j0w 31 posts 202 karma points
    Aug 23, 2019 @ 16:01
    j0w
    0

    Hi Paul ! Thanks for your time, it works like a charm :)

Please Sign in or register to post replies

Write your reply to:

Draft