【发布时间】:2015-05-26 17:35:46
【问题描述】:
在我的流星应用程序中 我有一个嵌套路由
this.route('assemble', {
path: '/assemble',
title: 'Assemble',
parent: 'home',
controller: 'MainLayoutController'
});
this.route('bottypelist', {
path: '/assemble/bottypelist',
title: 'BotType - List',
parent: 'assemble',
controller: 'MainLayoutController',
waitOn: function(){
return Meteor.subscribe('myBotTypes');
}
});
布局控制器在顶部加载一个徽标栏。布局模板是
<template name="mainLayout">
<div class="logobar" style="background-color:#FFF">
{{> logobar}}
</div>
<div class="top">
{{> yield region="header"}}
</div>
<div class="">
{{> yield}}
</div>
<div class="bottom">
{{> yield region="footer"}}
</div>
</template>
标志栏模板有一个标志图像。
<template name="logobar">
<div style="width:100%; min-width:100%; background-color:black; position:fixed; z-index:1029;">
<div class="container-fluid">
<div class="row" style="padding-right:0px; margin-right:0px">
<div class="com-md-4">
<a href="{{pathFor 'home'}}"> <img src="images/holmes_logo.png" width="280px" height="70px"></a>
</div>
</div>
</div>
</div>
</template>
但此图像未加载到应用程序中。 徽标链接为http://localhost:3000/assemble/images/holmes_logo.png
此链接工作正常 http://localhost:3000/images/holmes_logo.png
因此,对于外部路由,图像正在加载,但对于内部路由则没有。
我正在使用这个包来制作面包屑 monbro:iron-router-breadcrumb
【问题讨论】:
标签: meteor iron-router