I'm trying to build an angular SPA with angular-ui-router that searches artists from The Spotify Api After an artist search and binding artists images and names from all results on my home.html I need to be able to click on an image and change my view from /home to /{{artist.name}}, but when I click on the images my browser doesn't change the view
app.js:
myApp.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/');
$stateProvider
.state('home', {
url: '/',
templateUrl: '/views/home.html',
controller: 'HomeCtrl'
})
.state('chosenArtist', {
templateUrl: 'views/chosenartist.html',
controller: 'ChosenartistCtrl',
param: {pickedArtist: null},
url: '/artist/{artist.name}'
});
home.html:
<div ng-repeat="artist in artists">
<ul>
<li>{{artist.name}}</li>
<a ng-href="#/artist/{artist.name}"><img class="artist-album-picture" ng-src="{{artist.images[0].url}}" alt=""></a>
</ul>
if anyone has some insight on what i could be missing... thanks!