javascript - What should be the correct path of templateUrl in angularJs directive? -


i want give path of templateurl seprate .jade file. showing 500 err , error: [$compile:tpload] .

below code in directive

app.directive('personrecord',['$http',function(http){     return{         restrict : 'ae',         templateurl : '../../views/template.jade',         link : function(scope,ele,attr){          }     } }]); 

and folder structure below.

bin node_modules public |-- js     |-- main.js routes views |-- template.jade |-- index.jade app.js package.json 

please me out in ! missing here !

my suggestion put views folder inside public folder:-

bin node_modules public |-- js |    |-- main.js |--views     |-- template.jade     |-- index.jade routes app.js package.json 

and use

app.directive('personrecord', function(http){     return {         restrict : 'ae',         templateurl : 'views/template.jade',         link : function(scope, ele, attr){          }     }; }); 

hope helps :)


Comments

Popular posts from this blog

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -