Good afternoon, I made the following code: link . Accessing the JSFiddle, you can see that the Angle shows the title that is in the controller, but does not show any data related to the array. How do I resolve this issue?
HTML
<div ng-app="Series">
<div class="container" ng-controller="SeriesController">
<h1>{{titulo}}</h1>
<form autocomplete="off" ng-submit="adicionaSerie()">
<div class="form-group">
<label for="nome">Nome da serie:</label>
<input type="text" pattern="{1,}" placeholder="Minímo 1 caractere" id="name" ng-model="novaSerie.nome" required>
</div>
<div class="form-group">
<label for="produtora">Produra:</label>
<input type="text" ng-model="novaSerie.produtora">
</div>
<footer><button type="submit">Adicionar serie</button></footer>
</form>
</div>
<ul>
<li ng-repeat="serie in series">
<h3>{{serie.nome}}</h3>
<h3>{{serie.produtora}}</h3>
</li>
</ul>
</div>
AngularJS:
var app = angular.module("Series", []);
app.controller("SeriesController", function($scope){
$scope.titulo = "Adiciona Serie";
$scope.series = [
{
nome: 'Nothing',
produtora: 'Nothing Producers'
}
];
$scope.novaSerie = {};
$scope.adicionaSerie = function() {
var serie = angular.copy($scope.novaSerie);
$scope.artistas.push(serie);
$scope.novaSerie = {};
}
});