Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to go to a url which is parent to a url where angular config is defined
    primarykey
    data
    text
    <p>let me tell about my app: I m trying to build a webpage using node and angular. on / (root) url i m providing form for sign up and login. i didnt use angular here. after successfully logged in i m loading angular scripts and configuration file on /home. here is my configuration file for angular:</p> <pre><code>window.app.config(['$routeProvider', '$locationProvider', function($routeProvider,$locationProvider) { $locationProvider.html5Mode(true); $locationProvider.hashPrefix('!'); $routeProvider. when('/profile', { templateUrl: '/views/account.html', }). when('/edit', { templateUrl: '/views/edit.html', }). when('/home', { templateUrl: 'views/index.html' }). when('/signout', { templateUrl: 'views/signout.html' //on this view i load a controller which submits a form to /signout }). otherwise({ redirectTo: '/home' }); } ]); </code></pre> <p>on server side routing:</p> <pre><code>app.get('/',function(){ res.render('index',{ user: req.user? req.user:'guest' }); }); app.post('/login',function(){ //if success redirect to /home //if fails redirect to / }); app.get('/signout',function(){ //signing out the user here...and redirects to / }); app.get('/home',function(req,res){ res.render('users/home',{ user: req.user? req.user:'guest', message: req.flash('error') }) }); app.get('/profile',function(req,res){ res.render('users/home',{ user: req.user? req.user: 'guest', message: req.flash('error') }) }); app.get('/edit',function(req,res){ res.render('users/home',{ user: req.user? req.user:'guest', message: req.flash('error') }) }); </code></pre> <p>now here is the problem. suppose i m in /home url. this page contains a link landing page if i click this link angular redirects me to /home instead of /. how can i remove this problem? help plz :(</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload