Files
stf-DeviceFarmer/res/app/user/index.js
2015-03-16 20:48:24 +09:00

29 lines
687 B
JavaScript

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'))