I\'m new with AngularJS. I must create customs controls for a video player (HTML5 ).
Basically, I would use
getElementById(\'myvideotag\')
How about this:
In your HTML, set ng-click="video($event)"
(don't forget the $event
argument), which calls the following function:
$scope.video = function(e) {
var videoElements = angular.element(e.srcElement);
videoElements[0].pause();
}
I believe this is the simplest method.
Documentation for angular.element
Also, this might help you get used to Angular: How do I “think in AngularJS/EmberJS(or other client MVC framework)” if I have a jQuery background?