I was writing a sample app to display a set of youtube videos using AngularJS and filtering the videos based on language. I am binding user action to ngFilter and hiding and displaying filter based on that.
Please see JS Fiddle for code ==> http://jsfiddle.net/saratchandramrs/kxk9p/
If the ideal place to put the DOM manipulation code is on the directive per this AngularJS post - click here
Should I be doing something with the directives in my example? or would it be a overkill or could someone help me understand if I am doing it right per AngularJS principles? or if there is a better way to do what I am doing?
Also, every time the filter value changes, the DOM reloads, is there a way we can accomplish this functionality with out the reload? or is it like hiding individual elements based on the filter value (similar to css style:"display:none")?
Side note: I am using Bootstrap 3 for UI styling.
Thanks for the guidance.