I created a partial, /views/gallery_details.html. But it does not appear
in the ng-view div when I click on the link to it, thus none of the
expressions are filled in; it's not being set up as an SPA document, but
multi-page (but I want SPA). Isn't the page supposed to be a fragment of an
HTML doc that doesn't need the <html> or <head> tag content?
My partial:
<div class="row">
<img src="{{ x.photo }}" alt="">
<div class="panel">
<h5>{{ x.name2 }}</h5>
<p>{{ x.caption }}</p>
</div>
<a href="../index.html">More</a>
</div>
galleryApp.js:
var app = angular.module("myApp", ['ngRoute']);
app.config(function($routeProvider){
$routeProvider
.when('views/gallery_details.html',{
templateUrl: 'views/gallery_details.html'
})
.when('views/gallery_details.html',{
templateUrl: 'views/gallery_details.html'
});
});
index.html:
<div class="large-8 columns">
<div class="row" ng-controller="galleryCtrl">
<div class="large-3 small-4 columns" ng-repeat="x in names
| filter: id()">
<div style="line-height:150px; display:block;"><img
src="{{ x.photo }}"></div>
<div class="panel">
<h5>{{ x.name2 }}</h5>
<a href="views/gallery_details.html">More</a>
</div>
</div>
<!-- This View DOES NOT display the partial. -->
<div ng-view></div>
I'm using Foundation 5. Thanks!
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.