Skip to main content
5-Regular Member
May 11, 2017
Solved

Javascript

  • May 11, 2017
  • 2 replies
  • 2021 views

  Hej everyone,

could someone put in an advice on how to get javascript to work with hololens?

even the simplest ones that I tried are failing. (opacity, visibility and so on)

Thanks

Martin

Best answer by mwassmann

In the Home.js:

$scope.app.visibility = function(){

$scope.view.wdg['modelItem-2']['visible'] = false;

}

the prefix "app" is important .

In the function you are calling it by:

app.visibility();

2 replies

mwassmann5-Regular MemberAuthorAnswer
5-Regular Member
May 11, 2017

In the Home.js:

$scope.app.visibility = function(){

$scope.view.wdg['modelItem-2']['visible'] = false;

}

the prefix "app" is important .

In the function you are calling it by:

app.visibility();

5-Regular Member
May 18, 2017

For the interval function, especially with cancel interval using "scope.app" doesn't work.

In this line - $interval.cancel($scope.app.intervalPromise); HoloLens just discards it. Is there a limitation in using "cancel" method?