Skip to main content
14-Alexandrite
August 30, 2017
Solved

ThingWorx Studio | How to navigate to a specific view via js function

  • August 30, 2017
  • 1 reply
  • 3730 views

Hello.

I'm trying to create a js function that navigates to a specific view. It should work just like the binding to a view via click event from a button.

Thank you all for your help

Best answer by A_Macierzynski

Hi Marco,

Here you go:

$scope.homeNav = function(){

     $scope.app.fn.navigate('YourViewName');

}

Regards,

Adam

1 reply

5-Regular Member
August 30, 2017

Hello, Marco.

Is this a ThingWorx Studio specific use case that you're working on?

Thanks,

-- Craig A.

14-Alexandrite
August 31, 2017

Hello Craig.

Yes - it is.

Thanks

Marco

15-Moonstone
August 31, 2017

Hi Marco,

Here you go:

$scope.homeNav = function(){

     $scope.app.fn.navigate('YourViewName');

}

Regards,

Adam