Cannot Print Attributes from Service Array to Index - RESOLVED


I am not able to print the attributes of my suggestion.js service array to the index. How do i fix this problem. Thanks for the help.


<!DOCTYPE html>
<title>Suggestion Box</title>
<link href="
css/bootstrap.min.css" rel="stylesheet">
<link href="css/main.css" rel="stylesheet"/>
 <script src="js/vendor/angular.min.js"></script>
<body ng-app="SuggestionBox">
    <div class="main" ng-controller="HomeController">
        <div class="container">
        <div ng-repeat="post in posts">

<!-- Modules -->
    <script src="js/app.js"></script>
<!-- Controllers -->
<script src="js/controllers/HomeController.js"></script>
<!-- Services -->
    <script src="js/services/suggestions.js"></script>


var app = angular.module('SuggestionBox', []);


app.controller('HomeController', ['$scope', 'suggestions', function ($scope, suggestions) {
    $scope.posts = demoSuggestions.posts;


app.factory('suggestions', [function(){
var demoSuggestions = {
posts: [
title: 'Free pizza at club meetings',
upvotes: 15,
comments: [],
title: 'End all club emails with Laffy Taffy jokes',
upvotes: 9,
comments: [],
title: 'Retrofit water fountain with Gatorade',
upvotes: 7,
comments: [],
title: 'Sing Bon Jovi\'s "Living on a Prayer" halfway through meetings',
upvotes: 3,
comments: [],
return demoSuggestions;


I feel like the error is in the {{post.title}} within index, what should it be called?


any possible advice on how i can make this work?


Problem Resolved, the issue lied in my ng-repeat


where was the actual problem??
i think i am facing the same problem, help me out too if you can


you can use the above code. Only mistake I found is:
in HomeController.js, which should be:

app.controller('HomeController', [
    function($scope, suggestions) {
        $scope.posts = suggestions.posts;