0

I want to dynamically load templateUrl in angularjs directive without ng-include.

Muzaffar Mahmood
  • 1,688
  • 2
  • 17
  • 20

1 Answers1

0

You can try AngularJS $http http://www.w3schools.com/angular/angular_http.asp

<p>Today's welcome message is:</p>
<h1>{{myWelcome}}</h1>

</div>

<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope, $http) {
    $http.get("welcome.htm")
    .then(function(response) {
        $scope.myWelcome = response.data;
    });
});
</script>
Bills
  • 768
  • 7
  • 19