Answer the question
In order to leave comments, you need to log in
Else if for view angularjs?
Is it possible to perform a construction of the form in the template {{$first ? 'autoplay' : 'autobuffer}}
or
{{'autoplay' | $first}}
{ {'autobuffer' | !$first}}
Answer the question
In order to leave comments, you need to log in
Nicholas
<video
ng-repeat="src in video"
poster="{{poster}}"
{{$first ? 'autoplay' : 'autobuffer'}}
ng-show="$first"
src="{{src}}"></video>
Maybe something like this:
<video ng-attr-autoplay="{{vm.autoplay ? 'true' : 'false' }}"></video>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question