I'm trying to get the value from an HTML element from Angular controller.
<div ng-app="myApp" ng-controller="myControler"> <br /> <input id="Text1" type="text" runat="server" value="aValue" /
My controller :
var myApp = angular.module('myApp', []); myApp.controller("myControler", function ($scope, $document) { var name = angular.element($('#Text1')).val(); console.log(name); });
But name returns "undefined"...
Please, what I'm doing wrong ?