CopyrightController ES6 refactoring

This commit is contained in:
tmshv committed 2016-02-22 02:26:31 +03:00
1 parent a227082638
commit 33b4d0be22
2 files changed
+7 -6

No files matched your search

@@ -1,10 +1,10 @@
module.exports = function (app) {
app.controller('CopyrightController', function ($scope, $rootScope) {
export default function (app) {
app.controller('CopyrightController', ($scope, $rootScope) => {
$scope.developer = true;
$scope.now = new Date().getFullYear();
$rootScope.$on('$routeChangeSuccess', function (event, current) {
var originalPath;
$rootScope.$on('$routeChangeSuccess', (event, current) => {
let originalPath;
try{
originalPath = current['$$route'].originalPath;
}catch(e){
@@ -14,4 +14,4 @@ module.exports = function (app) {
$scope.developer = originalPath == '/';
});
});
};
};