Well, the content of a page on my site is generated from the following JSON template:
[
{
"company":{
"name":"Nome do Cliente",
"url":"#"
},
"client":{
"name":"Projeto",
"url":"#"
},
"tags":[
"tag1",
"tag2",
"tag3"
],
"description":"Lorem Ipsum",
"image":"#"
}
]
And then it looks like this:
<div class="row portfolio-item" ng-repeat="project in projects">
<div class="image hidden-sm hidden-xs col-md-6">
<img class="layout" src="{{project.image}}">
<span class="mask"></span>
</div>
<section class="col-md-6 col-sm-12 col-xs-12 portfolio-content">
<header>
<h2>{{project.company.name}}/{{project.client.name}}</h2>
<nav class="tags">
<a ng-repeat="tag in project.tags" href="/tag/{{tag}}">{{tag}}</a>
</nav>
</header>
<article>
<p>{{project.description}}</p>
</article>
</section>
</div>
However, I would like to be able to filter the content displayed according to the tag selected.
I tried to use the filter:tag
attribute, but the angle does not return me result. ('tag' was defended with a scope variable in the controller with one of the values of the 'tags' array of JSON)