Adding basic user redirect for external URL.

This commit is contained in:
Gunther Brunner
2015-03-16 20:48:24 +09:00
parent d8a972c7eb
commit f5cb2f91c0
5 changed files with 36 additions and 1 deletions

28
res/app/user/index.js Normal file
View File

@@ -0,0 +1,28 @@
module.exports = angular.module('stf.user-profile', [])
.config(function ($routeProvider) {
// if CONFIG.externalProfileURL else show page
var externalProfileURL = ''
var templateString
if (!externalProfileURL) {
templateString = require('./user.jade')
}
$routeProvider
.when('/user/:user*', {
template: function (params) {
console.log('params', params)
if (externalProfileURL) {
window.location.href = 'http://www.google.com';
}
return '<div></div>'
},
controller: function () {
}
})
})
.controller('UserProfileCtrl', require('./user-controller'))