-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
23 lines (23 loc) · 949 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var app = angular.module('musicPlayer', ['ngMaterial', 'ngMessages', 'ngResource', 'ngAnimate']);
app.config(['$httpProvider', '$mdThemingProvider', function ($httpProvider, $mdThemingProvider) {
$httpProvider.interceptors.push(function () {
return {
request: function (config) {
if (config.url === 'http://morad.rocks/player/api/album') {
config.data = angular.toJson(config.data);
}
return config;
},
response: function (response) {
if (response.config.url === 'http://morad.rocks/player/api/albums') {
response.data = angular.fromJson(response.data);
}
return response;
}
}
})
$mdThemingProvider.theme('docs-dark', 'default')
.primaryPalette('grey')
.dark();
// $mdThemingProvider.setDefaultTheme('docs-dark')
}]);