html - path not found when using templateUrl - angular directive -
i append directive on controller (custom.js) this:
.directive('protocolmodal', function(){ return { restrict: 'e', templateurl: '/protocol-modal.html' }; }); i use in index.html so:
<div class="modal fade" id="addentry" role="dialog"> <div class="modal-dialog"> <!-- modal content--> <protocol-modal></protocol-modal> </div> </div> my folder structure looks this:

and java-controller looks this
@controller @requestmapping("/index") public class protocolcontroller { /** * return form creating new protocol * * @param model * @return */ @requestmapping(value = "", method = requestmethod.get) public string getcreateform(model model) { return "index"; } } the error end getting, looks this

any appreciated.
the answer interested:
the trick move protocol-modal.html static folder
once done call this
templateurl: '/protocol-modal.html'
Comments
Post a Comment