Angular.js动态加载html无法解析


app.js:


 $http.get(article.html).success(function(data) {
    $scope.content = data;
});

index.html:


 <article>
    {{content}}
</article>

article.html:


 <h1>Hello World</h1>

此时在浏览器中显示出的是 <h1>Hello World</h1> 而不是我希望的Hello World。

请问是为什么,如何解决?

HTML html5 angularjs JavaScript

只是个打酱油的 9 years, 9 months ago
silver殇 answered 9 years, 9 months ago

Your Answer