php - Symfony code logout not reached angular -
i've got little problem , don't know how resolve it. i'm trying implement logout in symfony using angular 1x. of code is:
<button ui-sref='logout'>...</button>
angular:
.state('logout', { url: '/logout', controller: 'logoutcontroller', resolve: .... } )
routing.yml
path: /logout defaults: { _controller: appbundle:user:logout } method: [post]
usercontroller(appbundle):
public function logoutaction(request request){ $something = ""; // if put breakpoint here doesn't enter @ }
logoutcontroller:
.controller('logoutcontroller', function($scope) { $scope.logout = function(){ //i don't have code available right alg this: localstorage.remove(sessionid); window.location = '#/login' } $scope.logout(); }
the last angular part working, redirects me login page, cannot access symfony part , don't know why. url state should match routing path, , access logout method user controller. doesn't. ideas? have missed?
wiki
Comments
Post a Comment