HTML file
<input id="myName" ng-model="myName" val="{{myName}}">
Coffee Script file
$http.get('/api/name').then(
(resp) ->
$scope.myName = resp.data.name
$('#myName').val() # this is still ""
,
(errorResp) ->
# code
)
As you can see from the code above I'm trying to get the value from my API and then adding it to the scope. I have an event binding in jQuery that every time the input value changes, it draws the name to a canvas. Thing is, when I bind resp.data.name to $scope.myName the .val() still returns "" as if the input haven't changed.