I want to evaluate some js predefined function in angular expression. For example new Date(). But, not able to do that. If it is possible, please explain how to do that.
For example:
<input type="text" ng-init="yearFromSelector=new Date().getFullYear()" ng-model="yearFromSelector">
or
{{new Date().getFullYear()}}
I know that we can do that in controller and send value to view using $scope. But, I want to know is it possible to do it in angular expressions itself.
Thanks in advance.