Trouble implementing Meteoric (Meteor-Ionic) package — Ionic styling not showing up

蹲街弑〆低调 提交于 2019-12-11 03:52:43

问题


I want to create a Meteor app that implements the Meteoric package, enabling me to use Ionic UI features. Going off of this: https://github.com/meteoric/meteor-ionic/blob/master/GUIDE.md I'm trying to simply get it to use Ionic styling but it doesn't work. It Meteoric does render the HTML correctly, though.

router.js

Router.configure({
    layoutTemplate: 'layout'
});

Router.route('/', {
    name: 'timeLists'
});

layout.html

<template name="layout">
{{#ionBody}}
    {{> ionNavBar}}
    {{#ionNavView}}
        {{> yield}}
    {{/ionNavView}}
{{/ionBody}}
</template>

timeLists.html

<template name="timeLists">
{{#ionContent}}
        Hello.
{{/ionContent}}
</template>

What am I missing here? Thanks!


回答1:


Solution: I needed to include the Ionic styles in my app's stylesheet:

@import '.meteor/local/build/programs/server/assets/packages/meteoric_ionic-sass/ionic';
@import '.meteor/local/build/programs/server/assets/packages/meteoric_ionicons-sass/ionicons';



回答2:


As shown in this official example you really need to import styles

@import '.meteor/local/build/programs/server/assets/packages/meteoric_ionic-sass/ionic';
@import '.meteor/local/build/programs/server/assets/packages/meteoric_ionicons-sass/ionicons';


来源:https://stackoverflow.com/questions/28734787/trouble-implementing-meteoric-meteor-ionic-package-ionic-styling-not-showin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!