AngularJS based video and image gallery with php backend