Angularjs failed to load templateurl -


here directive

moduledirectives .directive('barnotification', ['$compile', '$timeout', function ($compile, $timeout) {     return {         restrict: 'e',         replace: true,         scope: {             barshow:'=',             bartype: '=',             barmessage:'=',             barallowclose:'=',             onclose: '&',             onopenslopesetting: '&'         },         link: function (scope, element, attr) {             scope.contentelement = element;             scope.oncloseexists = 'oncloser' in attr;             scope.$watch('barmessage', function () {                 $timeout(                         function () {                             angular.element(scope.contentelement[0].queryselector('#barmessage')).replacewith($compile('<div id="barmessage">' + scope.barmessage + '</div>')(scope));                         });             }, true);         },         templateurl: '/areas/claim/singlepage/directives/barnotification/barnotification.cshtml',         controller: 'barnotificationcontroller'     }; }]); 

here project directory

enter image description here

when app loads following error.

[$compile:tpload] failed load template: /areas/claim/singlepage/directives/barnotification/test.cshtml (http status: 403 forbidden)

what did miss?

as suspected web.config issue. line web.config <add key="webpages:enabled" value="false" /> , since page trying load .cshtml iis chocks on it. removing line web.config or turning value true solve issue.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -