【发布时间】:2013-12-24 07:10:34
【问题描述】:
我在客户端使用flask作为后端和angularjs
我的目录结构:
露水:
->app.py
->templates
->hello.html
->test.html
->static
->js
->directives.py
->lib
->angular.js
我的 app.py 文件:
from flask import Flask, make_response,render_template
@app.route("/aboutUs")
def aboutUs():
return render_template("test.html", title="test page")
我的directions.py 文件:
angular.module('components',[])
.directive("helloWorld",function($scope,$log){
$scope.$log = $log;
return{
restrict:"A",
templateUrl:"templates/hello.html"
}
})
angular.module('testApp',['components'])
Flask 能够正确渲染 test.html 模板,但 angular 显示 hello.html,找不到模板错误
【问题讨论】:
标签: angularjs flask angularjs-directive