我正在尝试制作一个很好的angularJS网格,顶部有框和一个过滤器,您可以选择所需的类型。我无法弄清楚为什么它对我不起作用,我尝试了this并且它有效但我无法将其应用到我的代码中。
无论如何,请仔细阅读并提供帮助
$Title
和HTML:
var ts = [{area:"area1", model:"500", color:"black", colspan: 3,rowspan: 3}, {area:"area2", model:"500", color:"red", colspan: 3,rowspan: 3}];
var filtered= [];
var areas = []
for (var i = 0; i < ts.length; i++) {
if (!areas.includes(ts[i].area)){
areas.push(ts[i].area);
}}
angular
.module('Application', ['ngMaterial'])
.controller('gridController', gridController)
function gridController ($scope) {
$scope.filterAreas = { area:"area1" };
$scope.dataDifferenceArray = [];
$scope.areas= areas;
$scope.filt = function(){
console.log("gg");
$scope.filterAreas = { area:"area2" };
};
$scope.colorTiles =ts
`
谢谢!