2016-10-13 3 views
0

angular-ui-tour을 사용하고 있기 때문에 동일한 프로젝트 내에서 동일한 투어 내역을 여러 프로젝트에 사용할 수 있습니다. 왜냐하면 그렇게해야하는 단독 투어 옵션이 있기 때문입니다. (이 문제에 대한 관련)내 앵글 투어가 분리 투어의 단계를 찾지 못하는 이유는 무엇입니까?

내 의존성 :

  • 각도 1.5.7
  • 부트 스트랩^3.3.6
  • 각도 - 부트 스트랩^2.0.0
  • 각-UI-투어^0.6.2

투어를 설정에 따라 초기화 할 수 있지만 단계를 확인할 때 단계가 없습니다.

둘러보기를 시작하려고하면 '아니오 단계'오류가 발생합니다. 여기에 무엇이 누락 되었습니까?

angular.module('myApp',['bm.uiTour']).run(['uiTourService', 
 
    function(uiTourService) { 
 
    //setup the tour 
 
    uiTourService.createDetachedTour('general', { 
 
     name: 'general', 
 
     backdrop: true, 
 
     debug: true 
 
    }); 
 

 
    //testing 
 
    var uitour = uiTourService.getTourByName('general'); 
 
    console.log(uitour); // Object {_name: undefined, initialized: true} 
 

 
    //test tour steps 
 
    console.log(uitour._getSteps()); // [] 
 

 
    //test tour start 
 
    uitour.start().then(function(data) { 
 
     //tour start succeeded 
 
    }, function(error) { 
 
     //tour start failed 
 
     console.log(error); // No steps. 
 
    }); 
 

 
    } 
 
]);
<body ui-tour> 
 
    <div tour-step tour-step-belongs-to="general" 
 
     tour-step-order="1" 
 
     tour-step-title="step 1" 
 
     tour-step-content="this is step 1"> 
 
    </div> 
 
    <div tour-step tour-step-belongs-to="general" 
 
     tour-step-order="2" 
 
     tour-step-title="step 2" 
 
     tour-step-content="this is step 2"> 
 
    </div> 
 
</body>

+0

:

은 지금, 당신은 각-UI-투어 tourStep 지침에서 다음과 같이 변경하여 문제를 해결할 수 bower 구성 요소는 여행 (나는 앵글 부트 스트랩 투어를 제거해야했다)과 뒤섞여 있었다. 이제 첫 단계가 보이지만 내용이나 버튼은 표시되지 않습니다. –

+0

단축키를 사용하여 단계를 전환 할 수 있으므로 단계가 첨부됩니다. 버튼은 단계에 표시되지 않으며 콘텐츠에도 동일하게 적용됩니다. –

답변

0

이 질문을 해결하기 위해 관리했습니다. 분명히 이것은 angular-ui-tour의 알려진 버그이며 다음 패치에서 수정 될 것입니다.

이 질문에 대한 자세한 내용은 issue on the GitHub을 참조하십시오. 나는 서로를 발견 지점으로 왔어요

//Add step to tour (old) 
 
scope.tourStep = step; 
 
scope.tour = scope.tour || ctrl; 
 

 
//Add step to tour (new) 
 
scope.tourStep = step; 
 
scope.tour = ctrl;