Hi,
I’m trying to do a simple portfolio site using angular.js, to get some basic understanding about the framework.
It’s all going well but there is one thing I cannot figure out.
If I have one template for example “single-work.html”, that I want to use for the single project view, how do I open this with the correct content depending on what portfolio item you click?
I have a grid with the projects, shown with ng-repeat and info from an array in the controller.
Now when I click one of the grid-items i want to open the single page view (single-work.html) with the correct content. How Can I do this?
My grid looks like this:
<div class="row">
<div class="small-12 medium-6 columns" ng-repeat="project in projects">
<a ui-sref="Open single-work.html with correct content" class="project bg-img" style="background-image: url({{ project.cover }});">
<div class="project-inner">
<div class="table">
<div class="table-cell">
<h2>{{ project.title }}</h2>
<h3>{{ project.desc }}</h3>
</div>
</div>
</div>
</a>
</div>
</div>