Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

For Tabs generated by ng-repeat, in tab-heading a call to a function that has $location.path(url) causes a weird page reload after redirect. #3266

Closed
ksmirnoff opened this issue Feb 7, 2015 · 1 comment

Comments

@ksmirnoff
Copy link

I was using angularjs 1.2 and ui-bootstrap-tpls-0.11.0. Works great!. I am generating tabs dynamically using ng-repeat.




×Close


...

In MainController.js I have a function
$scope.objMain.removeSelVal = function(id){
// remove item from items collection based on the passed id and reload the page
$location.path('/myroute/' + ids of remaining items);
};

When a user clicks on removeSelVal inside of each tab the selected id gets passed to a function in the main controller. This function removes one item and passes the new items collection to 'myroute'. Worked great in version 0.11.0. After the upgrade to 0.12.0 it stopped working. It does the redirect to 'myroute' but then does another redirect to an empty route. I can't use 0.11.0 with angular 1.3 since it breaks typeahead so I had to roll back to angular1.2 Hope the fix for 0.12.0 is coming soon. Thank you

@karianna
Copy link
Contributor

karianna commented Feb 8, 2015

@ksmirnoff Can you provide a plunkr?

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

Successfully merging a pull request may close this issue.

3 participants