anorgatarrak-frontend/app/catalog/catalog.component.js

44 lines
2.1 KiB
JavaScript
Raw Normal View History

angular.
module('catalog').
component('anList',{
template : '<a ng-repeat="item in $ctrl.catalog" class="square" style="background-image:url(\'{{item.img}}\');" ng-href="#!/catalog/{{item.id}}"></a>',
controller : function anListController() {
this.catalog = [
{ id: '1', title: 'Item 1', description: 'Description 1', img: 'assets/anorga1.jpg'},
{ id: '2',title: 'Item 2', description: 'Description 2', img: 'assets/anorga2.jpg'},
{ id: '3', title: 'Item 2', description: 'Description 2', img: 'assets/anorga3.jpg'},
{ id: '4', title: 'Item 2', description: 'Description 2', img: 'assets/anorga4.jpg'},
{ id: '5', title: 'Item 2', description: 'Description 2', img: 'assets/anorga5.jpg'},
{ id: '6', title: 'Item 2', description: 'Description 2', img: 'assets/anorga6.jpg'},
{ id: '7', title: 'Item 2', description: 'Description 2', img: 'assets/anorga7.jpg'},
{ id: '8', title: 'Item 2', description: 'Description 2', img: 'assets/anorga8.jpg'},
{ id: '9', title: 'Item 2', description: 'Description 2', img: 'assets/anorga9.jpg'},
{ id: '9', title: 'Item 2', description: 'Description 2', img: 'assets/anorga.jpg'},
{ id: '9', title: 'Item 2', description: 'Description 2', img: 'assets/anorga1.jpg'},
{ id: '9', title: 'Item 2', description: 'Description 2', img: 'assets/anorga3.jpg'},
{ id: '9', title: 'Item 2', description: 'Description 2', img: 'assets/anorga5.jpg'},
{ id: '9', title: 'Item 2', description: 'Description 2', img: 'assets/anorga2.jpg'},
{ id: '10', title: 'Item 2', description: 'Description 2', img: 'assets/anorga10.jpg'}
]
}
});
angular.
module('catalog').
component('anHome',{
templateUrl: 'app/catalog/home.template.html'
});
angular.
module('catalog').
component('anContact',{
templateUrl: 'app/catalog/contact.template.html'
});
angular.
module('catalog').
component('anInfo',{
templateUrl: 'app/catalog/info.template.html'
});