Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using ng-repeat and the audi-player directive #1

Closed
mylescc opened this issue Aug 31, 2013 · 2 comments
Closed

using ng-repeat and the audi-player directive #1

mylescc opened this issue Aug 31, 2013 · 2 comments

Comments

@mylescc
Copy link

mylescc commented Aug 31, 2013

So for my app I've got a playlist that is pulled into the app as a JSON and then the song title and artist is rendered using an ng-repeat directive. In each ng-repeat I'm creating the tag with . However, this ng-src="" doesn't work in the directive.

Any ideas on how I could possibly fix this? Otherwise been a great player.

@colthreepv
Copy link
Owner

Just keep the playlist as JSON in the controller (it should respect this structure), you only need 1 audio-player tag, it may be empty at the start.

When the playlist gets populated, you can use ng-repeat to display title/artist, and put a ng-click=audioTag.playPause($index) on the element representing the song.

For an example on playPause and ng-repeat you may look there.

playPause(songNumber) is an undocumented feature, i'm sorry but i'll update Readme.md as soon as i can 😄

@mylescc
Copy link
Author

mylescc commented Sep 2, 2013

Ok cool. thanks. I'll give it go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants