I have a simple directive, <my-directive></my-directive>
client/scripts/directives/myDirective.directive.js:
angular
.module('myApp')
.directive('myDirective', myDirective);
function myDirective() {
return {
restrict: 'AE',
scope: {
data: '='
},
templateUrl: "'/client/templates/partials/liftOwnerConfirmedRiders.html'",
};
}
client/templates/partials/myDirective.html:
<p>Hi. How are you?</p>
Why will the text not show when I use the directive in another page?
templateUrlfor your directive set to'/client/templates/partials/liftOwnerConfirmedRiders.html', but you are showing the contents of'client/templates/partials/myDirective.html', which I assume is a missed change when trying to make the example. Beyond that, you aren't showing where these are being used, whatng-appcontext the directive is under on the other page, and where the script for this directive is loaded in your HTML.