I am in need of assistance with a particular issue:
I am trying to configure settings for an application and would like to utilize the UI-Bootstrap accordion.
This is the HTML code I have so far:
<accordion close-others="oneAtATime">
<accordion-group ng-repeat="group in groups" heading="{{group.groupTitle}}">
<accordion-content></accordion-content>
</accordion-group>
</accordion>
The structure of the "accordion" is a div
element with the attribute
ng-controller="AccordionController"
. In this controller, there is a variable named groups
which looks like this:
$scope.groups = [{
groupTitle: "title1",
templateUrl: "file1.html"
}, {
groupTitle: "title2",
templateUrl: "file2.html"
}]; // ... and so on
The directive accordionContent
should provide different template URLs based on either the $index
or groupTitle
(it doesn't matter).
Here is my implementation of the accordionContent
directive:
settings.directive("accordionContent", function () {
return {
restrict: "E",
templateUrl: //**here is my problem**
};
});
The content also includes some AngularJS functionality, so I understand that needs to be taken into account. (or not?)