Page 1 of 1

Angular back button on index page - how to hide it?

Posted: Thu Nov 19, 2015 1:10 pm
by Andrew Peacock

Hi,
I've added a back button to my app, and it works fine using the backButton directive. However, the button is displayed on the homepage, which I don't want.

The button is in the index view header, so present in all pages.

I've tried using ng-hide="hideBackButton", and then setting $scope.hideBackButton to true / false on various pages, but it seems to make no difference.

Can you help please?
Regards,
Andy


Angular back button on index page - how to hide it?

Posted: Thu Nov 19, 2015 1:31 pm
by zaik

You have to create scope variable in index page with its type set as boolean.

Then you just have to set value of that variable true or false.

You dont need to declare it again on each page.


Angular back button on index page - how to hide it?

Posted: Thu Nov 19, 2015 10:40 pm
by Andrew Peacock

Hmm. I tried that, but ended up taking the code back out again.

I'll re-try it, and share screenshots and/or share the project with support if I still can't get it working.

Thanks Zaik,

Andy


Angular back button on index page - how to hide it?

Posted: Fri Nov 20, 2015 5:32 am
by zaik