2017-02-01 20 views
0

こんにちは私はフラスコのテンプレートフォルダに保存されたテンプレートにangular.jsを呼び出していますが、動作しません。どのようにフラスコから静的ファイルを取得できますか?フラスコで角度jからスタティックテンプレートを呼び出す方法は?

var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.expandable', 'ui.grid.selection', 'ui.grid.pinning', 'ui.grid.pagination']); 


app.controller('ThirdCtrl', ['$scope', '$http', '$log', function ($scope, $http, $log) { 

     $scope.gridOptions = { 
     paginationPageSizes: [25, 50, 75], 
     paginationPageSize: 25, 
     expandableRowTemplate: "/templates/expandableRowTemplate.html", 

...

+0

あなたのフラスコを追加することができますがコード、または一般的にもう少しコードですか? – ZombieChowder

+0

解決済み@ZombieChowder –

答えて

0

私は私のフラスコに次の行追加解く:

def template(): 
    return render_template("expandableRowTemplate.html") 

app.add_url_rule('/templates/expandableRowTemplate', 'template', template) 

そして、私の.jsファイル変更時:

expandableRowTemplate: "http://127.0.0.1:5000/templates/expandableRowTemplate", 
関連する問題