0
我包括谷歌的angularjs脚本,但他们似乎并没有与应用程序一起工作。如果我用互联网浏览器直接打开html网页,它可以正常工作。 该页面只是一个简单的测试与NG-模型,看看你所输入的内容,并没有打印{{名}}Angularjs不会与我的谷歌应用程序引擎配置
<script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
这是应用程序:
import os
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
from google.appengine.ext.webapp import template
class MainHandler(webapp.RequestHandler):
def get (self, q):
if q is None:
q = 'index.html'
path = os.path.join (os.path.dirname (__file__), q)
self.response.headers ['Content-Type'] = 'text/html'
self.response.out.write (template.render (path, {}))
def main():
application = webapp.WSGIApplication ([('/(.*html)?', MainHandler)], debug=True)
util.run_wsgi_app (application)
if __name__ == '__main__':
main()
这是我的app.yaml
application: sixth-tribute-676
version: 2
runtime: python27
api_version: 1
threadsafe: no
handlers:
- url: /(.*\.(gif|png|jpg|ico|js|css))
static_files: \1
upload: (.*\.(gif|png|jpg|ico|js|css))
- url: .*
script: main.py
“它不起作用”不是很有用,你能更具体吗? –
控制台日志说什么?任何有关未找到或类似的文件? –
不,只有GET样式表和html文件 –