Greetings and thank you for your anticipated assistance. I am relatively new to Angular and still learning Javascript. I've encountered an issue that has me stumped.
WebStorm is indicating that my imported controller is not defined. I'm trying to reference it from another file, which has been properly imported. My goal is to utilize the Spotify API with the angular-js web wrapper.
Index.html
<!DOCTYPE html>
<html ng-app='app'>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.min.js"></script>
<script src="spec/lib/angular-spotify/src/angular-spotify.js"></script>
<script src="spec/lib/angular-spotify/examples/main.controller.js"></script>
<title>angular-spotify demo!</title>
<style>
ul {
list-style: none;
}
.media {
display: table;
width: 100%;
}
.media img {
display: table-cell;
max-width: 100%;
}
.media-details {
padding-left: 1em;
vertical-align: middle;
display: table-cell;
width: 90%;
}
</style>
</head>
<body ng-controller='test'>
<script>
var app = angular.module('app');
app.controller('test');
</script>
<!--Page Content Here-->
main.controller.js
Angular module settings and functions related to Spotify integration.
angular-spotify.js
Javascript module responsible for handling Spotify API calls and authentication methods.
Console Log
Uncaught ReferenceError: test is not defined
Error details here...