当前位置: 动力学知识库 > 问答 > 编程问答 >

angularjs - nginclude not able to load respective html snippets

问题描述:

<!DOCTYPE html>

<html ng-app="">

<head>

<link rel="stylesheet" href = "http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">

<script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>

</head>

<body ng-controller="userCtrl">

<div class="container">

<div ng-include="'myUsersList.html'"></div>

<div ng-include="'myUsersForm.html'"></div>

</div>

</body>

</html>

I have the two files 'myUserList.html' and 'myUsersForm.html' in the same folder as this index file. It is still not loading the two 'html pages' one below other. I am getting a blank page. Is anything missing???

网友答案:

And also don't miss to initialize model.

angular.module('MyApp', []);
分享给朋友:
您可能感兴趣的文章:
随机阅读: