1

I current working Web Application with Angular JS.

I using a Angular route to implement a Single page Application.

This is my implemented code to route.

config(function($routeProvider){
            $routeProvider
                    .when('/init',{templateUrl:'/member/join?m=init'})
                    .when('/begin',{templateUrl:'/member/join?m=begin'})
                    .when('/end',{templateUrl:'/member/join?m=end'})
                    .otherwise({redirectTo:'/'});

        }).

I was stuck with a problem. AngularJS Router is update after page loading.

<body>        
<ng-view> 
</ng-view>
</body>

But, I can't update direct way without Angular Router.

I wonder how to update without angular router.

Example.

ontroller('registerController', function($scope, $http, baseUrl) {
            $scope.register = function() {
                var reqPromise = $http.post(baseUrl+'member/join',$scope.user);                            

                reqPromise.success(function(data, status, headers, config) {
               /// <-- i want to update <ng-view> without router. Just, direct update <ng-view>!


                });

help me.

user3736174
  • 333
  • 2
  • 3
  • 16
  • have a look at this answer http://stackoverflow.com/questions/11003916/how-do-i-switch-views-in-angularjs-from-a-controller-function you basically do this `$location.path(view)`, that however still uses router internally – dark_ruby Jun 20 '14 at 10:46

0 Answers0