This is my code so far, to return a view in browser via Angular custom directive, using @html.partialview
var newOne = function () {
return {
restrict: "A",
templateUrl: "newone.html",
replace: true,
scope: {},
controller: ['$scope', function ($scope) {
}]
}
}
I declare the id "newone.html" here:
<script type="text/ng-template" id="newone.html">
@Html.Partial("~/Views/AngularTemplates/Newone.cshtml")
</script>
and ofcourse I call the directive from the html:
<div data-new-one></div>
Unfortunately I do not get the appropriate response. All I get is an error message(console inspector): [$compile:tpload] Failed to load template: newone.html
I tried to store the .cshtml in multiple folders, or even load it from bundleconfig... But nothing! Any ideas? Thank you!