Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not reload a templateUrl on a route change #364

Closed
soundstep opened this issue Aug 28, 2013 · 3 comments
Closed

Not reload a templateUrl on a route change #364

soundstep opened this issue Aug 28, 2013 · 3 comments

Comments

@soundstep
Copy link

I've got a screen containing both a google map and a canvas, I access it in the app with this URL:

"/artist/123"

Here is the config:

$stateProvider
    .state('visualisation', {
        url: '/:artist/:id',
        templateUrl: 'artist.html',
        controller: 'ArtistController',
        resolve: {
            artistData: {...}
        }
    });

When I navigate from:
/artist/123
to:
/artist/124
Using:
$location.path('/artist/124');

The resolve gets the data again, which is good, the controller is created again, which is fine.

My problem is that the html is also replaced by the template. I'd like to keep the current html when I navigate to the same url pattern ('/:artist/:id'), only get the data with the resolve and update my views with the new data.

The view contains a canvas and a map that should not be reloaded, only updated manually. On a route such as the one above, the map should pan to a new location, this is why I want to avoid to reload the html.

Any idea how can I achieve this?

Romu

@nateabele
Copy link
Contributor

This is not currently possible, but we're working on it.

@soundstep
Copy link
Author

Right, any quick hack I could use or dev branch I can fork to solve my problem?

I sadly didn't have the choice not to use ui.router in production as the angular basic router fell short straight away.

My options are:

@nateabele
Copy link
Contributor

@soundstep Not that I'm aware of, sadly. Keep an eye on #125 though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants