Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/389.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript ember js中的Flash消息不工作。创建flash对象时未定义对象_Javascript_Twitter Bootstrap_Ember.js_Flash Message_Ember Cli Rails - Fatal编程技术网

Javascript ember js中的Flash消息不工作。创建flash对象时未定义对象

Javascript ember js中的Flash消息不工作。创建flash对象时未定义对象,javascript,twitter-bootstrap,ember.js,flash-message,ember-cli-rails,Javascript,Twitter Bootstrap,Ember.js,Flash Message,Ember Cli Rails,组件。 {{#each flashMessages.queue as |flash|}} {{flash-message flash=flash messageStyle='bootstrap'}} {{/each}} <button {{action 'getFlash'}}> Click for Flash </button> 错误消息:未捕获类型错误: Cannot read property 'success' of undefined at Cla

组件。

{{#each flashMessages.queue as |flash|}}
  {{flash-message flash=flash messageStyle='bootstrap'}}
{{/each}}
<button {{action 'getFlash'}}> Click for Flash </button>
错误消息:未捕获类型错误:

Cannot read property 'success' of undefined
    at Class.getFlash (flash-item.js:8)
    at Class.send (ember.debug.js:39876)
    at Class.superWrapper [as send] (ember.debug.js:39636)
    at ember.debug.js:11124
    at Object.flaggedInstrument (ember.debug.js:17747)
    at ember.debug.js:11123
    at Backburner.run (ember.debug.js:720)
    at Object.run (ember.debug.js:21514)
    at ActionState.handler (ember.debug.js:11103)
    at HTMLButtonElement.<anonymous> (ember.debug.js:41005)
getFlash @ flash-item.js:8
send @ ember.debug.js:39876
superWrapper @ ember.debug.js:39636
(anonymous) @ ember.debug.js:11124
flaggedInstrument @ ember.debug.js:17747
(anonymous) @ ember.debug.js:11123
run @ ember.debug.js:720
run @ ember.debug.js:21514
handler @ ember.debug.js:11103
(anonymous) @ ember.debug.js:41005
dispatch @ jquery.js:5201
elemData.handle @ jquery.js:5009
无法读取未定义的属性“success”
在Class.getFlash(flash item.js:8)
在Class.send(ember.debug.js:39876)
在Class.superWrapper[as send](ember.debug.js:39636)
在ember.debug.js:11124
位于Object.flaggedInstrument(ember.debug.js:17747)
在ember.debug.js:11123
在Backburner.run上(ember.debug.js:720)
在Object.run(ember.debug.js:21514)
在ActionState.handler(ember.debug.js:11103)
在HTMLButtoneElement

余烬安装余烬引导 ember安装ember cli闪存


这两个是安装的

每当我们安装任何ember插件时,都需要停止并启动
ember-serve


通常,每当我面临任何问题时,我都会在相应的项目github问题列表中搜索,这将帮助我解决问题。在本例中,我刚刚发现并确认了这一点,并且

您是否尝试在安装后停止和启动ember server?仅此而已。非常感谢。
Cannot read property 'success' of undefined
    at Class.getFlash (flash-item.js:8)
    at Class.send (ember.debug.js:39876)
    at Class.superWrapper [as send] (ember.debug.js:39636)
    at ember.debug.js:11124
    at Object.flaggedInstrument (ember.debug.js:17747)
    at ember.debug.js:11123
    at Backburner.run (ember.debug.js:720)
    at Object.run (ember.debug.js:21514)
    at ActionState.handler (ember.debug.js:11103)
    at HTMLButtonElement.<anonymous> (ember.debug.js:41005)
getFlash @ flash-item.js:8
send @ ember.debug.js:39876
superWrapper @ ember.debug.js:39636
(anonymous) @ ember.debug.js:11124
flaggedInstrument @ ember.debug.js:17747
(anonymous) @ ember.debug.js:11123
run @ ember.debug.js:720
run @ ember.debug.js:21514
handler @ ember.debug.js:11103
(anonymous) @ ember.debug.js:41005
dispatch @ jquery.js:5201
elemData.handle @ jquery.js:5009