AngularJS:jQuery步骤错误



我在jQuery steps插件中完成了大约3个步骤。当URL路径发生变化时(由于在同一页面上进行导航),这些步骤需要动态更改。内容的动态变化是由ng开关带来的。问题是:我第一次浏览页面时,它就工作了。我看到ng开关默认的DIV,但当我单击更改URL的导航时,页面不会再次加载。它给了我一个错误:"缺少一个或多个相应的步骤标题。"代码部分:

<h1>Heading
<div ng-switch on="$location.$$url">
       <div ng-switch-default>
       </div>
       <div ng-switch-when="/../../">
       </div>
</div>
<script> 
    $("#wizard").steps({
     labels: {
        finish: "Import"
     },
     headerTag: "h1",
     bodyTag: "div", 
     ..... (other things)
     });
</script>

有什么建议吗?

当我添加时,它工作了

$timeout (function (){
        $scope.wizardSteps();
    },1000);

到init函数。

最新更新