Skip to content

How to load angularjs in partial view in Asp.net Mvc

Gurmeet Singh

Gurmeet Singh

Asked Sep 6, 2017, 9:30 PM EDT2 answers
Share
LinkedInX
Please any one can help me to load angular js in partial views,
Description: I am using bootstrap modal and i load partial view on it but angular js is not loading on it it shows like {{cust.name}} ,i making new ng-controller  and ng-app on it, 
what its not working.. 
because angularjs is not compiled on partials view please me out to resolve that issue

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Ram Chan
    0
    id="courseList" ng-bind-html="courseListHtml">
     
    And in your controller:
    1. $http(...).then(function (obj)  
    2. {  
    3. $scope.courseListHtml = $sce.trustAsHtml(obj.data);  
    4. });  
    0
  • Gurmeet Singh
    0
    Its working but i need seperate angular controller in script file in partial, which is not working to compile angularjs file
    0