Reputation: 786
I'm new in angular js. I am trying to include simple html file in my page.
This is my code:
<!DOCTYPE html>
<html ng-app="">
<head>
</head>
<body ng-controller="userController">
<div class="container">
<div ng-include src="'about.html'"></div>
</div>
<script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js"></script>
</body>
</html>
and about.html
<table class="table table-striped">
<thead><tr>
<th>Edit</th>
<th>First Name</th>
<th>Last Name</th>
</tr></thead>
<tbody><tr>
<td>
Edit
</td>
<td>ss</td>
<td>dd</td>
</tr></tbody>
</table>
But it doesn't include 'about.html' page.
What's wrong with this code?(Sorry for bad english)
Thanks in advance.
Upvotes: 1
Views: 2771
Reputation: 17385
The included file url should be relative to the client url of the including page. You are probably using some sort of web framework that abstracts your URL format.
You should put the included files together with other static files.
Upvotes: 0
Reputation: 2740
Try
<div ng-include="'about.html'"></div>
or
<ng-include src="'about.html'"></ng-include>
Upvotes: 1