I am very new in AngularJs, I want to create a Select list and when the choose one option open the correspondent file. This is my main.html
<select ng-model="model.options" >
<option value="1"> 1</option>
<option value="2"> 2</option>
<option value="3"> 3</option>
</select>
<div ng-show="model != null" class="main" ng-controller = "TestCtrl">
<li class="artist cf" ng-repeat="item in data">
<div class="info">
<h1>{{item.name}}</h1>
</div>
</li>
</div>
this is the controller
angular.module('myApp')
.controller('TestCtrl', ['$scope', '$http', function($scope, $http) {
$http.get('data.json').success(function(data) {
$scope.data = data;
});
}]);
Someone can help me doing something like this ?
$http.get('data-$SELECTED-OPTION-VALUE.json').success(function(data) {