Event view not displaying

Hi there, I’m having trouble getting the event.html view to show the details for the event. Here is my code:

event.html

`

{{ event.name }}

{{ event.to | date: "h:mma" }} - {{ event.to | date: "h:mma" }}

{{ event.where }}

`

EventController.js

app.controller('EventController', ['$scope', '$routeParams', 'events', function($scope, $routeParams, events) { events.success(function(data) { $scope.event = data.events[$routeParams.id]; }); }]);

app.js

var app = angular.module('CalendarApp', ['ngRoute']); app.config(function($routeProvider) { $routeProvider .when('/', { controller: 'DayController', templateUrl: 'views/day.html' }) .when('/:id', { controller: 'EventController', template: 'views/event.html' }) .otherwise({ redirectTo: '/' }); });

I’m not sure what I am doing wrong. The events show up fine, but when I click on a event, it just shows the file name in text? Any help would be appreciated.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.