fix repeat click like button when page refreshing
This commit is contained in:
parent
306e3c01ab
commit
edd192135a
|
@ -0,0 +1,3 @@
|
|||
--ignore-file=ext:log
|
||||
--ignore-dir=public
|
||||
--ignore-dir=tmp
|
|
@ -4,7 +4,7 @@
|
|||
$http.get url
|
||||
.success (res)->
|
||||
$scope.count = res.count
|
||||
|
||||
|
||||
$scope.like = $cookies.like
|
||||
|
||||
if $scope.like
|
||||
|
@ -12,7 +12,7 @@
|
|||
url: window.location.pathname + "/likes/#{$scope.like}/is_liked"
|
||||
method: 'GET'
|
||||
.success (res)->
|
||||
if res == 'true'
|
||||
if res == true
|
||||
$scope.is_liked = true
|
||||
else
|
||||
$scope.is_liked = false
|
||||
|
|
Loading…
Reference in New Issue