레일 뷰에 Ember 앱을 임베드하려고하는데로드가 간단한보기를 얻을 수 없습니다. gemfile의Rails에 포함 된 Ember.js가 (아무)보기를로드하지 않습니다.
관련 부분 :
gem "ember-rails"
gem 'ember-source'
gem 'emblem-rails'
application.js :
... other html
#ember
-# http://haml.info/docs/yardoc/file.REFERENCE.html#html5_custom_data_attributes
%script#application{ :type => 'text/x-handlebars', :data => {:template_name => 'application' }}
{{outlet}}
%script{ :type => 'text/x-handlebars', :data => {:template_name => 'index' }}
test
... other html
엠버 폴더 : 여기
//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require underscore
//= require ../../../vendor/assets/javascripts/paper.js/dist/paper-full.min.js
//= require handlebars
//= require ember
//= require ember-data
... some more
//= require_tree .
window.Tabbasco2 = Ember.Application.create({
rootElement: '#ember',
LOG_TRANSITIONS: true,
LOG_BINDINGS: true,
LOG_VIEW_LOOKUPS: true,
LOG_STACKTRACE_ON_DEPRECATION: true,
LOG_VERSION: true,
LOG_TRANSITIONS_INTERNAL: true,
LOG_ACTIVE_GENERATION: true,
debugMode: true,
});
Tabbasco2.ApplicationView = Ember.View.extend({
//templateName: 'nav'
})
Tabbasco2.ApplicationController = Ember.Controller.extend({
init: function() {
// Do stuff
}
})
그리고 그로드 레일에 대한 HAML 볼 수있다 컨트롤러, 도우미, 모델 등은/app/assets/javacripts에 직접 나열되어 있습니다
이것에 대한 이상한 점은 내가 뭘하려고해도 엠버는 엠버 자체의 부트 스트래핑 정보보다 더 많은 것을 기록하지 않는다는 것입니다. 응용 프로그램은 네트워크 관리자가 모든 자바 스크립트가로드되고 있음을 알 수 있지만로드되지 않는 것 같습니다. 크롬 콘솔에서 :
DEBUG: -------------------------------
ember.js:3522DEBUG: Ember : 1.5.0
ember.js:3522DEBUG: Handlebars : 1.3.0
ember.js:3522DEBUG: jQuery : 1.10.2
ember.js:3522DEBUG: -------------------------------
ember.js:3522DEBUG: For more advanced debugging, install the Ember Inspector from https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi
엠버는 엠버 객체에서 볼 수있는 바와 같이, 템플릿을 찾을 수행합니다
> Ember.TEMPLATES
Object
-> application: function (context, options) {
-> index: function (context, options) {
-> __proto__: Object
그러나, 심지어 아무것도로드하려고하지 않는 것 같습니다. 라우팅을 다르게 설정해야합니까? 컨트롤러 순서 변경 또는보기? 내 페이지는 다음 레일 경로에서로드 :
get '/partiture/show/:hash/', to: 'partitures#show'
. 어떤 도움이라도 대단히 감사하겠습니다.