sails.js - res.view() changes static asset path -


when using res.view('reset') of static assets (ie css , js files) prefixed reset.

example:

www.myapp.com/reset/angular.min.js <-- incorrect

www.myapp.com/angular.min.js <-- correct

i have following controller:

reset: function (req, res) {   user.findone({ resetpasswordtoken: req.params.token, resetpasswordexpires: { $gt: new date(date.now()) } }, function (err, user) {     if (!user) {       res.notfound();       return res.backtologinpage();     }     return res.view('reset')   }); } 

naturally, sails responding 404's because none of assets live @ path.

how res.view('reset') serve files same directory when specifying view route 'get /reset': {view: 'reset'}?


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -