I want to dynamically load templateUrl in angularjs directive without ng-include.
Asked
Active
Viewed 147 times
1 Answers
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
-
Thank you very much. Actually I am to do this with directive. – Muzaffar Mahmood Nov 01 '16 at 08:12