Use single expression instead of a function call to show selected tab

This commit is contained in:
Siteshwar Vashisht
2013-10-19 22:47:18 +05:30
parent 892cc7da31
commit 3d2315d596
2 changed files with 6 additions and 15 deletions

View File

@@ -7,15 +7,6 @@ controllers.controller("main", function($scope, $location) {
$location.path(view);
$scope.currentTab = view;
}
$scope.tabCssClass = function(view) {
var cls = "tab";
if ($scope.currentTab == view) {
cls += " selected_tab";
}
return cls;
}
})
controllers.controller("colorsController", function($scope, $http) {