Javascript 州';x';已定义AngularJS ui.router

Javascript 州';x';已定义AngularJS ui.router,javascript,angularjs,angular-ui-router,Javascript,Angularjs,Angular Ui Router,我在projet中包含了一个多步骤表单,它可以工作,但在其他一些页面上有一个错误 这是我用来包含多步骤表单的代码。 还有我犯的错误 Error: State 'uploadForm'' is already defined at n (https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.10/angular-ui-router.min.js:7:6487) at q.r [as state] (https://cdnjs.c

我在projet中包含了一个多步骤表单,它可以工作,但在其他一些页面上有一个错误

这是我用来包含多步骤表单的代码。

还有我犯的错误

Error: State 'uploadForm'' is already defined
at n (https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.10/angular-ui-router.min.js:7:6487)
at q.r [as state] (https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.10/angular-ui-router.min.js:7:7429)
at http://localhost:51506/js/app.js?v=636306308881195716&l=en&u=636306206076525625:11:10
at Object.invoke (http://localhost:51506/js/angular.js?v=636282972889242203&l=en&u=636306206076525625:41:295)
at callInvoke (http://localhost:51506/js/ocLazyLoad.js?v=636282972890662285&l=en&u=636306206076525625:317:55)
at _invokeQueue (http://localhost:51506/js/ocLazyLoad.js?v=636282972890662285&l=en&u=636306206076525625:322:29)
at _register (http://localhost:51506/js/ocLazyLoad.js?v=636282972890662285&l=en&u=636306206076525625:206:21)
at success (http://localhost:51506/js/ocLazyLoad.js?v=636282972890662285&l=en&u=636306206076525625:647:37)
at http://localhost:51506/js/angular.js?v=636282972889242203&l=en&u=636306206076525625:126:182
at m.$eval (http://localhost:51506/js/angular.js?v=636282972889242203&l=en&u=636306206076525625:140:367)
我的app.js

var app = angular.module('myApp', ['ngSanitize', 'ui.bootstrap', 'fcsa-number', 'ui.tree', 'oc.lazyLoad', 'angular.filter', 'ngAnimate','ui.router']);

app.config(function ($stateProvider, $urlRouterProvider) {
debugger;
  $stateProvider
       // route to show our basic form (/form)
        .state('uploadForm', {
            url: '/uploadForm',
            templateUrl: 'templates/step_Form/form.html?v=' + new  Date().getDay()
        })

        // url will be nested (/form/profile)
        .state('uploadForm.upload', {
            url: '/upload',
           templateUrl: 'templates/step_Form/form-upload.html?v=' + new Date().getDay()
    })

        // url will be /form/interests
        .state('uploadForm.content', {
            url: '/content',
            templateUrl: 'templates/step_Form/form-content.html?v=' + new Date().getDay()
             })


        // catch all route
        // send users to the form page 
        $urlRouterProvider.otherwise('/uploadForm/upload');
    })

这看起来像是输入错误(错误指的是
'uploadForm'
,请注意额外的
'
)。但是,很难确定,因为此代码不显示错误,您提供的plunker也不显示错误。在我刚刚添加“debugger;”的地方,在出现错误的页面中,它会传递两次。你知道为什么吗?你有多个文件包含
config()
?有三个文件:ocLazyLoad.js/angular-form-builder-components.js/angular-validator-rules.js。但是没有人使用$stateProvider如果您删除其他配置,它会工作吗?这看起来像是输入错误(错误指的是
'uploadForm'
,请注意额外的
'
)。但是,很难确定,因为此代码不显示错误,您提供的plunker也不显示错误。在我刚刚添加“debugger;”的地方,在出现错误的页面中,它会传递两次。你知道为什么吗?你有多个文件包含
config()
?有三个文件:ocLazyLoad.js/angular-form-builder-components.js/angular-validator-rules.js。但是没有人使用$stateProvider如果您删除其他配置,它会工作吗?