Customizing landing page of a Canvas web application

Hello there,

Quick question, how would one go about updating / customizing a canvas web application landing page to a specific HTML page? For example: If a user enters as the browser address, http://localhost:8080/, it should be redirected automatically to http://localhost:8080//Customers.html instead.

Thanks,
Nimeesh

Hi @nkaushal,

If just updating the home.html and home.js is not a viable option, an alternative is to just put a one line of code in the controller section, in home.js that looks like:

$state.go('<state name here>');

The name of the state of your page, if you have defined it via the Admin page of your Canvas application is located on the User Menu Management link. So just click on the page that you would like to check the state of and it will be on the following:

So for the above, if you want to redirect your user to this page, you should write in the home.js within the controller section:

$state.go('af-test-2');


Paul

Thanks Paul. The alternative option worked!

One thing observed with the alternative option was that since it is a redirect, home.html does get loaded up first before the redirection to a specific html page. Therefore the default sample home.html must also be edited so as to not see the default home icon and title before the redirect actually happens.