我想让我的 Bootstrap 模态与 AngularJS 一起工作。一种模式是
<div id="addToPlaylist" class="modal hide fade" aria-hidden="true" aria-labelledby="addToPlaylistLabel" role="dialog">
<div class="modal-header">
<h3>My Modal</h3>
</div>
<div class="modal-body">
MODAL BODY
</div>
<div class="modal-footer">
<button class="btn btn-primary">Save</button>
</div>
</div>
它将歌曲添加到用户已有的播放列表或创建新的播放列表。我想将它与一组歌曲一起使用,但一次只能与一首歌曲一起使用(目前)。
<div class="cell" ng-repeat="song in media.data">
</div> <!-- grid-wrapper -->
角控制器是
'use strict';
angular.module('PortalApp')
.controller('SongsCtrl', function ($scope, MediaService, $location, AudioPlayerAPI, FavoriteService) {
$scope.toggleFaves = function (song) {
FavoriteService.toggle(song).success(function (response) {
if (response.successFlag) {
song.favorite = !song.favorite;
}
});
}
$scope.fetched = false;
});
我该如何进行这项工作?
PS 我不想要 jQuery,只想要 Angular 的 jQuery Lite 插件。