JSFiddle - React, Tailwind, and code Playground
by Alan Doe
HTML
<div ng-app="myApp">
<div ng-controller="myController">
<div ng-repeat="item in items">
<p>{{item.name | toUpper}}</p>
<p>{{item.weight}}</p>
</div>
</div>
</div>
JavaScript
var myModule = angular.module("myApp", []);
myModule.factory('Item', function()
{
var items={};
items.query = function()
{
var stuf = [{name:'zetta', weight:300},{name:"coco", weight:10}];
return stuf;
};
return items;
});
myModule.filter('toUpper', function()
{
var titleCase = function(input)
{
return input.toUpperCase();
};
return titleCase;
});
function myController(Item, $scope)
{
$scope.items = Item.query();
}