user3415447
user3415447

Reputation: 93

Refreshing pages in angularjs

I have two html pages one is the main template(index) and other is the welcome page.the content of the maintemplate(i.e index page) is visible on every page . The index page contains a dropdown and on selection of dropdown,the data on the welcome page changes. I want to reload the welcome page on the drop down selection I am using location.reload(),but it reloads the entire page and I want to reload only the welcome page. Can somebody Help...Thanks

Upvotes: 0

Views: 70

Answers (1)

ACOMIT001
ACOMIT001

Reputation: 510

I would look at using $route.reload.

For example:

<select ng-change="refreshPage()"><!-- Your select box content. -->

JS:

function refreshPage()
{
    $route.reload();
}

Upvotes: 2

Related Questions