better label handling

This commit is contained in:
Athou
2013-04-09 10:20:39 +02:00
parent 7b9bfeb816
commit 7d676d4d3e

View File

@@ -33,8 +33,9 @@ module.controller('SubscribeCtrl', function($scope, SubscriptionService) {
};
$scope.urlChanged = function() {
if ($scope.sub.url && !$scope.sub.title) {
$scope.sub.title = 'Loading...';
var msg = 'Loading...';
if ($scope.sub.url && (!$scope.sub.title || $scope.sub.title == msg)) {
$scope.sub.title = msg;
SubscriptionService.fetch({
url : $scope.sub.url
}, function(data) {