Ember JS索引路线,带模态插座

时间:2016-02-01 23:56:27

标签: ember.js

我尝试用

制作菜单
  • 列表视图(帖子
  • 列表中的每个项目都应该有其子路由,一个独立的视图,没有列表( posts / post / 1
  • 菜单应始终包含active
  • 列表视图下的new路由。 (在我的应用程序中,它实际上是列表中的模态)

我设法解决了这个问题,除了最后一个: http://emberjs.jsbin.com/marafumove/1/edit?html,js,output

帖子/新应在帖子列表下呈现。

1 个答案:

答案 0 :(得分:1)

您想要在帖子下呈现的新路线。因此,不要在Sub Delete_No_Data_Columns() Dim col As Long, lRow as Long Dim h as Long'to store the last columns/header lRow = Range("E" & Rows.Count).End(xlUp).Row ' assumes column E will have last used row ... adjust as needed h = Range("E1").End(xlToRight).Column 'find the last column with the data/header For col = h To 5 Step -1 If Application.CountA(Columns(col)) = 1 Then Range(Cells(2,col),Cells(lRow,col)).Delete shift:=xlToLeft End If Next col Application.ScreenUpdating = False ' i think you want this at the beginning of the program, no? End Sub 路由中呈现列表,而只使用post/index路由。

使用

post

而不是

script type="text/x-handlebars" data-template-name="posts"

并使用

script type="text/x-handlebars" data-template-name="posts/index"  

而不是

App.PostsRoute = Ember.Route.extend({ 

要呈现没有列表的单个帖子,请通过覆盖App.PostsIndexRoute = Ember.Route.extend({ 方法将其呈现到应用程序模板中。

renderTemplate

Here is the updated demo.

相关问题