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:

enter image description here

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

enter image description here

any appreciated.

the answer interested:

the trick move protocol-modal.html static folder

once done call this

templateurl: '/protocol-modal.html' 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -