APlayer
APlayer copied to clipboard
can someone guide me how to integrate aplayer with angular js
I am currently using
var app = angular.module('myApp', []);
app.config([
'$interpolateProvider', function($interpolateProvider) {
return $interpolateProvider.startSymbol('{(').endSymbol(')}');
}
]);
app.directive("aplayer", function() {
return {
restrict : "AC",
link: function(scope, element, attrs) {
var nativeElement = element[0];
var ap1 = new APlayer({
element: nativeElement,
narrow: false,
autoplay: false,
showlrc: false,
mutex: true,
theme: '#ad7a86',
mode: 'circulation',
listmaxheight: '0px',
music:[
{
title: 'あっちゅ~ま青春!',
author: '七森中☆ごらく部',
url: 'http://devtest.qiniudn.com/あっちゅ~ま青春!.mp3',
pic: 'http://devtest.qiniudn.com/あっちゅ~ま青春!.jpg'
},
{
title: 'secret base~君がくれたもの~',
author: '茅野愛衣',
url: 'http://devtest.qiniudn.com/secret base~.mp3',
pic: 'http://devtest.qiniudn.com/secret base~.jpg'
},
{
title: '回レ!雪月花',
author: '小倉唯',
url: 'http://devtest.qiniudn.com/回レ!雪月花.mp3',
pic: 'http://devtest.qiniudn.com/回レ!雪月花.jpg'
}
]
});
}
};
});
Everything works fine. But i don't know how to pass music list dyanamically
What do you mean pass music list dyanamically?
issue solved. thanks for reply