问题描述
我创建了一个流星项目,并添加了krazyeom:material-design-lite软件包.然后,我创建了2个简单的html文件,其中一个包含
I created a meteor project and added krazyeom:material-design-lite package. Then I created 2 simple html files, one that contains
<head>...</head>
和另一个包含
<body>...</body>
我的设计看起来像这样:
My design looks something like this:
在添加iron:router之后,仅将<body>
替换为<template name="layout">
,将</body>
替换为</template>
.
After I added the iron:router and only replaced <body>
with <template name="layout">
and </body>
with </template>
.
Router.route('/', {name: 'layout'});
它看起来像这样:
如您所见,设计现在不是100%高度;并且如果我将尺寸调整为移动分辨率,它不会显示3条线图标来显示侧边栏.
As you can see the design is now not 100% height; and if I resize to mobile resolution, it doesn't appear the 3 lines icon to show the sidebar.
可能是什么问题?
推荐答案
嗯,我遇到了同样的问题.到目前为止,在将mdl与铁路由器一起使用时存在一些问题.甚至还有Template.xyz.events无法使用mdl自定义标记触发的问题.
Well i had the same issues.As of now there is some issues while using mdl with iron router . Even there are issues with Template.xyz.events not firing with mdl custom tags .
此问题将很快得到解决(希望如此)
This issues will be resloved soon (Hope so)
https://github.com/Zodiase/meteor-mdl
此回购协议正在积极开发中,以支持流星中的mdl.请按照此仓库进行任何升级.
This repo is under active development in supporting mdl in meteor . Please follow this repo for any advancement.
其他明智的做法是使用类似的插件,例如 https://atmospherejs.com/materialize/materialize
Other wise use similar addon like https://atmospherejs.com/materialize/materialize
它像mdl一样进行材料设计,我正在几个项目中使用它,没有任何问题
which does the material design like mdl and i am using it for couple of my project and have no issues
这篇关于安装Iron:router后Material Design Lite布局已更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!