@ is a syntax error...
well, you also re-define the function toggleIsFollowing() as false, probably not what you want to do.
if that's not it, it sound like the this/that thing we usually see in dom events.
why not just close it instead of going through knockout?
Code:
function AppViewModel() {
var toggled = true;
this.toggleIsFollowing = function () {
toggled = !toggled
};
this.isFollowing = @Model.IsFollowing.ToString().ToLower()
this.followButtonText = ko.computed(function () {
return toggled ? "Follow" : "Unfollow";
});
}