Copied to clipboard

Flag this post as spam?

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


  • Harshit 64 posts 226 karma points
    Mar 09, 2016 @ 05:45
    Harshit
    1

    Navigation Service on ng-table's ng-click event

    Hi,

    I am trying to navigate the control on ng-click to a view of a custom section.

    this is the ng-click on td

     <td data-title="'Name'" sortable="'Name'" filter="{ 'Name': 'text' }" class="date" ng-click="openDetail(item)" >
      {{ item.Name}}                      
      </td
    

    this is my js file

       $scope.openDetail = function (Item) {
    
    
            }
    

    i was playing with navigation services but didnt find anything there :(

    Is there any service available for doing it in umbraco?where we can specify the path and querystring parameters.

    Thanks,

  • Kraig Kramer 1 post 71 karma points
    May 11, 2016 @ 14:24
    Kraig Kramer
    0

    I struggled with this as well and found that using the angular $location service works, but not sure if there is an Umbraco specific service.

    $location.path('/Application/Section/Template/Id');
    

    The Application and Section names are case sensitive and the id is required. In addition I found that this method does not remove querystring params. Specifically, the create parameter that comes from the tree. To remove this or change query params use the following.

    $location.path('/Application/Section/Template/Id').search({});
    //or to set / change value
    $location.path('/Application/Section/Template/Id').search({param:value});
    
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies