起初我不得不承认我是 Meteor 的新兵。昨天我将 mrt:iron-router-progress 添加到我的 meteor 元素中,因为我想简单地为 myApp 添加背景图片。但我的问题是它不会屈服于这个 iron-router-progress-div-Tag,而是在它下面,所以背景不可见。
<body>
<div id="iron-router-progress" class="done" style="width: 100%;"></div>
<div class="page-header">
<section id="login">
</body>
我有以下包裹: - 标准应用程序包 - meteor 黑客:npm - 地铁:时刻 - 较少的 - nemo64: Bootstrap - 铁:路由器 - npm 容器 - mrt:iron-router-progress - CoffeeScript - 大火 - meteorhacks:快速渲染
layout.html 看起来像:
<template name="layout">
{{> yield region="navbar"}}
{{> yield}}
{{> yield region="footer"}}
</template>
router.js 看起来像:
Router.configure({
layoutTemplate: 'layout',
notFoundTemplate : 'notFound'
});
IronRouterProgress.configure({ })
Router.map( function(){
this.route('user_verification',
{path:'/',
progress: {enabled: true}
})
})
我在 style.css 中定义了#iron-router-progress。
最佳答案
对于 Meteor 0.91 或更高版本,您必须按照以下方式安装 Iron Router Progress,当您安装此软件包时它就可以正常工作。
$ meteor add mrt:iron-router-progress
你不必把它放在你的代码 html 中
<div id="iron-router-progress" class="done" style="width: 100%;"></div>
铁路由器进度有两种状态
<div id="iron-router-progress" class="spinner" style="width: 0%;"></div>
<div id="iron-router-progress" class="spinner loading done" style="width: 100%;"></div>
如果你有问题,你必须检查你是否有另一个 class spinner、loading 或 done 来代替 iron router progress
关于css - 地铁 :iron-router-progress in Meteor 0. 9.1.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25785402/