Angular-foundation (http://pineconellc.github.io/angular-foundation/) utilizes angular directives to incorporate Foundation components like Modals, Tabs, and other front-end services.
The issue I'm encountering is that the directives come with preset "templateUrl" attributes that are not present on my server. Since this is an external dependency managed by Bower, manual updates to the library are not possible. Here's an example directive extracted from the library:
angular.module('mm.foundation.tabs', [])
.directive('tabset', function() {
return {
restrict: 'EA',
transclude: true,
replace: true,
scope: {},
controller: 'TabsetController',
templateUrl: 'template/tabs/tabset.html',
link: function(scope, element, attrs) {
scope.vertical = angular.isDefined(attrs.vertical) ? scope.$parent.$eval(attrs.vertical) : false;
scope.justified = angular.isDefined(attrs.justified) ? scope.$parent.$eval(attrs.justified) : false;
scope.type = angular.isDefined(attrs.type) ? scope.$parent.$eval(attrs.type) : 'tabs';
}
};
})
In my module, I have specified a dependency on the mm.foundation module:
angular.module('foundationDemoApp', ['mm.foundation.tabs']).controller('TabsDemoCtrl', function ($scope) {
$scope.tabs = [
{ title:"Dynamic Title 1", content:"Dynamic content 1" },
{ title:"Dynamic Title 2", content:"Dynamic content 2" }
];
$scope.alertMe = function() {
setTimeout(function() {
alert("You've selected the alert tab!");
});
};
})
Currently, I am using Gulp along with gulp-html2js for templating bundling. The github README mentions customizing templates (https://github.com/pineconellc/angular-foundation) using $templateCache, but I'm unsure how to modify the templateUrl to point to my template's location.
If anyone has any insight on this matter, I would greatly appreciate it!