I currently have two functioning routes:
app.config(['$routeProvider', '$locationProvider', function(
$routeProvider, $locationProvider) {
$routeProvider.
when("/list/:class", {
controller: "listController",
templateUrl: "DatabaseObject",
reloadOnSearch: true
}).
when("/edit/:class/:id?", {
templateUrl: "editortemplate"
}).
otherwise("/custombrowsingstartpage");
}]);
Both of these routes are working well!
My goal is to render the "editortemplate" from one route within a modal window on the "/list/:class" route.
Within the "listController," I have a function that opens the modal:
$scope.showEditorPanel = function (size, a, b) {
//console.log($scope);
var modalInstance = $modal.open({
animation: true,
//templateUrl: '#/edit/'+b+'/'+a,
templateUrl: 'editortemplate',
controller: 'editorController',
size: size,
backdrop: true,
scope: $scope
});
The template renders correctly, but I am unsure how to pass it the necessary class and id variables that the template requires based on its route.
I attempted defining the route with variables (class == var b, id == var a) instead of the template URL, but had no success:
//templateUrl: '#/edit/'+b+'/'+a,