Skip to content

Commit

Permalink
merging with latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
erikringsmuth committed Feb 21, 2015
2 parents 0fe6934 + 341d6aa commit dc8aece
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/app-router.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,17 @@
// keep track of the route currently being loaded
router.loadingRoute = route;

// Update model instead of re-rendering if we're on the same route
if (router.activeRoute && router.activeRoute === route && route.firstElementChild) {
var model = createModel(router, route, url, eventDetail);
for (var property in model) {
if (model.hasOwnProperty(property)) {
route.firstElementChild[property] = model[property];
}
}
return;
}

// import custom element or template
if (route.hasAttribute('import')) {
importAndActivate(router, route.getAttribute('import'), route, url, eventDetail);
Expand Down

0 comments on commit dc8aece

Please sign in to comment.