You said you have:

     When I use 
*     $location.path('/');* 
     at the end of the post-controller 

Do you call $location.path() in the success method of your $http (or 
$resource) call?  It should go in there so that you only redirect to the 
list *after* the call to save changes returns from the server.  Otherwise 
the user could request the list before the save call was completed.


On Saturday, January 31, 2015 at 11:59:24 AM UTC-6, Marcus Didius wrote:
>
> Hello, 
> I'am a AngularJS novice. I am trying to build a simple demo CRUD 
> application which uses AngularJS on the client and Restful Service on the 
> backend.
> I have a page which shows all entries of a db table (list-page) and one 
> that adds an entry (post-page).
> My problem is how to automatically show the list-page after the submit of 
> the post-page.
> When I use 
> *$location.path('/');* 
> at the end of the post-controller the list-page is displayed seemlessly, 
> but the list is not updated with the new entry.
> So I have replaced with
> *$window.location.href = '/mitglieder/#!/';*
> * $window.location.reload();*
> This works. But it displays the old list-page for an instance and then 
> reloads it with the new version. Also I think it might not be the right way 
> to use AngularJS this way. I do not want to reload the whole page, I only 
> want to reload the data from the server not the view.
> What would be the right strategy for this?
> Many thanks for any input.
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to