I have a simple question. I have a <div>
and a <button>
. I want to access the inner markup of the <div>
inside the function I wire with ng-click
. How can I do this without jQuery?
<div id = text-entry-view contenteditable="true"></div>
<button class="btn btn-primary btn-block" ng-click = 'sendMsg()'>Send</button>
app.controller('ActiveController', ['$scope', 'contact', '$ManageLoggedInUsername', function($scope, contact, $ManageLoggedInUsername){
$scope.loggedInUsername = $ManageLoggedInUsername.getUsername();
$scope.contact = contact;
$scope.sendMsg = function(){
//console.log("MSG :: " + <div#text-entry-view.innerHTML>);
}
}]);
So I want the content of the <div>
inside the sendMSG
function. Kindly help.