Panels in Angular

Asked

Viewed 268 times

1

I would like to make a page in Angular that looks like the image below:

inserir a descrição da imagem aqui

which is nothing more than a page with multiple panels, which I will add a list of information within them... Which component can I use to get this result?

1 answer

2


No need for external components. Use a combination of ngRepeat and CSS:

angular.module('myApp', [])
.controller('myController', function($scope){
  $scope.paineis = ['Painel1','Painel2','Painel3','Painel4','Painel5','Painel6']; 
});
.painel
{
  display:inline-block;
  width:200px;
  border:2px solid black;
  padding:10px 5px;
  margin:5px;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.8/angular.js"></script>
<div ng-app="myApp">
  <div ng-controller='myController'>
    <div class='painel' ng-repeat='i in paineis'>{{i}}</div>
  </div>
</div>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.