0
votes

I have this piece of code written and for some reason after I made some changed it complains within data obj css property.

The error says that the concat is not defined, even thou I have it on my packages.json defined.

.state('signup-facebook', {
            url: '/students/signup',
            templateUrl: MODULE_PATH + 'become/authentication/signup/connect-facebook.client.view.html',
            controller: 'StudentAuthenticationController',
            controllerAs: 'StudentAuthentication',
            data: {
                step: 1,
                animate: true,
                css: cssModules.students.concat(cssModules.users), // This line of code showing error
                cssModuleName: 'students'
            }
        })

I just dont understand why this is not working.

Here you have the full error that Chrome displays:

Uncaught Error: [$injector:modulerr] Failed to instantiate module coderstrust due to: Error: [$injector:modulerr] Failed to instantiate module students due to: TypeError: Cannot read property 'concat' of undefined at config (http://localhost:3000/modules/students/client/config/students.become.client.routes.js:23:45) at Object.invoke (http://localhost:3000/lib/angular/angular.js:4708:19) at runInvokeQueue (http://localhost:3000/lib/angular/angular.js:4601:35) at http://localhost:3000/lib/angular/angular.js:4610:11 at forEach (http://localhost:3000/lib/angular/angular.js:322:20) at loadModules (http://localhost:3000/lib/angular/angular.js:4591:5).....

1
and you did run nom install after you made an entry in package.json?Vatsal
yes I did, npm install, npm update... still not workingLulzim
what is cssModules.students? The problem is not with concat. The problem is with cssModules.students which is undefined and when you will try to perform any method on undefined you will get an errorVatsal
write this as an answer and let me mark it as accepted :)Lulzim

1 Answers

0
votes

What is cssModules.students? The problem is not with concat. The problem is with cssModules.students which is undefined and when you will try to perform any method on undefined you will get an error.

Hope this helps :)

Happy Learning