Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Error #30

Open
rosostolato opened this issue Jan 18, 2018 · 4 comments
Open

Uncaught Error #30

rosostolato opened this issue Jan 18, 2018 · 4 comments

Comments

@rosostolato
Copy link

this is my code:

stateHelperProvider

        .state({
            name: 'assets',
            url: '/assets',
            templateUrl: 'app/assets/assets.html',
            children: [
                {
                    name: 'monitoring',
                    url: '/monitoring',
                    templateUrl: 'app/assets/assetsMonitoring/assetsMonitoring.html',
                    controller: 'assetsMonitoringCtrl',
                    controllerAs: 'vm'
                },
                {
                    name: 'report',
                    url: '/report?{view:string}',
                    templateUrl: 'app/assets/assetsReport/assetsReport.html',
                    controller: 'assetsReportCtrl',
                    controllerAs: 'vm',
                    params: { view: { dynamic: true } }
                },
                {
                    name: 'manager',
                    url: '/manager',
                    templateUrl: 'app/assets/assetsManager/assetsManager.html',
                    controller: 'assetsManagerCtrl',
                    controllerAs: 'vm'
                }
            ]
        });

and this is what angular says:

Failed to instantiate module app due to: Error: States that specify the 'parent:' property should not have a '.' in their name (assets.monitoring)

I resolved the problem using { keepOriginalNames: true }, but I have to use "manager" instead of "assets.manager" in ui-sref tag and it's causing me problems with other states that has the same child name, which is the case of "manager" state.

What do I do?

@stereokai
Copy link

Did you solve this?

@rosostolato
Copy link
Author

No, I gave up and stopped using it

@stereokai
Copy link

I have found what the problem is.

In this block (line 43), add delete state.parent;

            if (!options.keepOriginalNames) {
                fixStateName(state);
                delete state.parent;
            }

@stereokai
Copy link

@davidzwa Well, that's up to @marklagendijk, the repo owner :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants