JSFiddle - React, Tailwind, and code Playground

by slim7700

HTML

<div ng-app="app" ng-controller="indexCtr">
<div ng-repeat="nom in cardslist">
  {{nom.name}}
</div>
</div>

JavaScript

var app=angular.module("app",[]);
app.factory('IndexSrv',function(){
return {
	cardslist : 
	[	
		{ 'name' : 'Skylasher' },
		{ 'name' : 'Thrashing Mossdog' },
		{ 'name' : 'Zhur-Taa Druid' },
		{ 'name' : 'Feral Animist' },
		{ 'name' : 'Rubblebelt Maaka' },
		{ 'name' : 'Mending Touch' },
		{ 'name' : 'Weapon Surge' },
		{ 'name' : 'Woodlot Crawler' },
		{ 'name' : 'Phytoburst' },
		{ 'name' : 'Smelt-Ward Gatekeepers' },
		{ 'name' : 'Debt to the Deathless' },
		{ 'name' : 'Woodlot Crawler' },
		{ 'name' : 'Blaze Commando' },
		{ 'name' : 'Uncovered Clues' }
	],
	getCard : function(){
		return this.cardslist;
	}
}});
 
app.controller('indexCtr',['$scope', 'IndexSrv', function($scope,IndexSrv){
// mock des cartes dans lesquelles rechercher
	$scope.cardslist = IndexSrv.getCard();
    console.log($scope.cardslist);
 
	
}]);