我正在使用Ionic 2尝试让Firebase基于this tutorial工作,但使用Ionic rc4。任何帮助表示赞赏。
require 'optparse' options = {} OptionParser.new do |opts| opts.on("-t T", "arg t") do |t| options[:t] = t end opts.on("-y Y", "arg y") do |y| options[:y] = y end end.parse! p options ### ruby temp.rb -t 1 -y 2 {:t=>"1", :y=>"2"}
没有编译错误,但我收到以下运行时错误:
Your system information: ordova CLI: 6.4.0 Ionic Framework Version: 2.0.0-rc.4 Ionic CLI Version: 2.1.18 Ionic App Lib Version: 2.1.9 Ionic App Scripts Version: 0.0.47 ios-deploy version: Not installed ios-sim version: Not installed OS: Windows 10 Node Version: v6.9.2 Xcode version: Not installed
它似乎是引用Unhandled Promise rejection: Template parse errors:
'h7' is not a known element:
1. If 'h7' is an Angular component, then verify that it is part of this module.
2. If 'h7' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message. ("
</h2>
<p class="chat-text">{{item.chat_text}}</p>
[ERROR ->]<h7 class="chat-time">{{item.timestamp | date:'dd/MM/yyyy'}}</h7>
</ion-item>
</ion-list>
"): HomePage@23:6 ; Zone: <root> ; Task: Promise.then ; Value: Error: Template parse errors:
'h7' is not a known element:
1. If 'h7' is an Angular component, then verify that it is part of this module.
2. If 'h7' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message. ("
</h2>
<p class="chat-text">{{item.chat_text}}</p>
[ERROR ->]<h7 class="chat-time">{{item.timestamp | date:'dd/MM/yyyy'}}</h7>
</ion-item>
</ion-list>
"): HomePage@23:6
Stack trace:
TemplateParser</TemplateParser.prototype.parse@http://localhost:8100/build/main.js:20796:19
RuntimeCompiler</RuntimeCompiler.prototype._compileTemplate@http://localhost:8100/build/main.js:45698:30
RuntimeCompiler</RuntimeCompiler.prototype._compileComponents/<@http://localhost:8100/build/main.js:45618:56
,但我不确定它是否有任何错误。
的 home.ts
HomePage
答案 0 :(得分:3)
转换为答案:您的模板中有一个标记,该标记无法通过解析器,该标记为
<h7>
将其更改为
<h3>
例如,它应该工作(或者将它放在div中并根据需要使用CSS类设置它)。
答案 1 :(得分:2)
h7标记只是在HTML 5中存在。这是您的错误。这不是离子或火基误差。只需为h6或其他标签更改h7,此错误将消失