【发布时间】:2017-09-29 05:43:51
【问题描述】:
大家好,我需要实际路由一个文件夹,其中将包含多个文件和文件夹。
For example
My folder name is Contains -- with inner folder sample1 sample2.
sample1 folder contains -- app.js index.js Index.html
sample2 folder contains -- app.js index.js Index.html
so I want routes for like every file in each folder's
example -- localhost:3030/Contains/sample1/Index.html
localhost:3030/Contains/sample2/Index.html
localhost:3030/Contains/sample1/index.js
localhost:3030/Contains/sample1/app.js
... etc
如何使用 stateProvider 实现这一点?
提前致谢
【问题讨论】:
-
为什么你想要 js 文件的路由?对于 HTML,您可以直接在
templateURL中提供路径 -
我实际上有一个 Scorm 课程文件夹,我希望加载与该原因相关的所有内容。所以需要路由该文件夹中的每个文件。