I want to pass an object into my controller so I will have a contextual set of elements available at the time the controller fires. I'm basically trying to configure the meta information of each controller in my config file for my routes.
For example. (I want to create a meta and have it injected into the controller somehow...
//In config.js
routes["/dashboard"] = {
controller: 'controllers.DashboardController',
templateUrl: 'templates/dashboard.html',
meta: {
title: "My Title",
description: "My Desc"
}
};
//In dashboard.js
controllers.DashboardController = function ($scope, $location, Page) {
'use strict';
Page.setTitle(meta.title); // Pull this from content coming in
Page.setDescription(meta.description);