2014-11-25 2 views
0

구문 분석 응용 프로그램에 폴리머 요소를 표시하는 데 문제가 있습니다.구문 분석 할 때 폴리머를 올바르게 가져 오는 방법

는 파일 디렉토리는 다음과 같습니다 몸에

<!-- css --> 
<link type='text/css' rel="stylesheet" href="../css/main.css"> 

<!-- polymer --> 
<link rel="import" href="../components/paper-tabs/paper-tabs.html"> 

및 용지 버튼 :

<paper-button>PAPER BUTTON</paper-button> 

된 index.html에서
/cloud 
    /views 
    app.js 
    main.js 

/config 
    global.json 

/public 
    /components 
    /css 
    index.html 

나는이 같은 수입이

그러나 배포 할 때 용지 버튼이 표시되지 않습니다. css는 올바르게 적용되지만, /public/index.html이/css에 액세스 할 수있는 이유는/components가 아니므로 매우 이상합니다. 내가 로컬 호스트에있는 응용 프로그램을 실행할 때

에 갈 것을 확인했습니다

/cloud 
    /views 
    app.js 
    main.js 

/config 
    global.json 

/public 
    /components 
    /css 
    /step-1 
     index.html 
    index.html 

: 파일 디렉토리는 다음과 같이되도록 디버깅 할 수

는 I/공중에 폴리머 튜토리얼에서 step-1 폴더를 이동

http://localhost:8000/public/step-1/ 

중합체 요소가 올바르게 표시됩니다. 그래도 배포 된 구문 분석 응용 프로그램에서이 액세스 할 수 없으며 올바르게 라우팅을 설정하는 방법을 잘 모르겠습니다. 나는 expressjs 워드 프로세서를 쳐다 보면서 해당하는 수입을

app.use(express.static(__dirname + '/bower_components')); 

를 추가하고 응용 프로그램의 루트 디렉토리에 폴리머를 설치하고 사용하여 시도

app.set('views', 'cloud/views'); // Specify the folder to find templates 
app.set('view engine', 'ejs'); // Set the template engine 
app.use(express.bodyParser()); // Middleware for reading request body 

: BTW, app.js

는 기본 라우팅 구성을 포함 ,하지만 여전히 작동하지 않습니다.

무엇이 누락 되었습니까?

답변

1

LOL. 용지 버튼 대신 폴리머 js 가져 오기 및 가져온 용지 탭을 잊어 버렸습니다.

는 고정 :

<!-- polymer --> 
<script src="bower_components/webcomponentsjs/webcomponents.js"></script> 
<link rel="import" href="bower_components/paper-button/paper-button.html"> 
0

나는 비슷한 문제가있다, 어떤 중합체가 파이썬 http 서버에서 제대로 실행되는지 샘플을 제공한다.

관련 문제