Closed ivailo-stoianov closed 10 years ago
You're missing 'ui.router' from your apps module dependencies.
Thanks for your reply! I really hoped that the solution will be so simple, but sadly it's not. :sob: From the good side by adding ui.router I am not getting any errors, but from the bad side my pages are empty. And the funny thing is that if I remove them, everything works.
if I remove them, everything works
Do you mean if you remove both infinite-scroll
and ui.router
from your angular module includes that your page loads with content and no errors?
Yep.
Mind posting your .yo-rc.json
and bower.json
?
Haven't really touched these except adding the module in bower.json.
.yo-rc.json:
{
"name": "vcinema",
"version": "0.0.0",
"dependencies": {
"angular": ">=1.2.*",
"json3": "~3.3.1",
"es5-shim": "~3.0.1",
"jquery": "~1.11.0",
"bootstrap": "~3.1.1",
"angular-resource": ">=1.2.*",
"angular-cookies": ">=1.2.*",
"angular-sanitize": ">=1.2.*",
"angular-bootstrap": "~0.11.0",
"font-awesome": ">=4.1.0",
"lodash": "~2.4.1",
"angular-socket-io": "~0.6.0",
"angular-ui-router": "~0.2.10",
"ngInfiniteScroll": "~1.1.2"
},
"devDependencies": {
"angular-mocks": ">=1.2.*",
"angular-scenario": ">=1.2.*"
}
}
And bower.json
{
"generator-angular-fullstack": {
"insertRoutes": true,
"registerRoutesFile": "server/routes.js",
"routesNeedle": "// Insert routes below",
"routesBase": "/api/",
"pluralizeRoutes": true,
"insertSockets": true,
"registerSocketsFile": "server/config/socketio.js",
"socketsNeedle": "// Insert sockets below",
"filters": {
"js": true,
"html": true,
"css": true,
"uirouter": true,
"bootstrap": true,
"uibootstrap": true,
"socketio": true,
"mongoose": true,
"auth": true,
"oauth": true,
"facebookAuth": true
}
},
"generator-ng-component": {
"routeDirectory": "client/app/",
"directiveDirectory": "client/app/",
"filterDirectory": "client/app/",
"serviceDirectory": "client/app/",
"basePath": "client",
"moduleName": "",
"filters": [
"uirouter"
],
"extensions": [
"js",
"html",
"css"
],
"directiveSimpleTemplates": "",
"directiveComplexTemplates": "",
"filterTemplates": "",
"serviceTemplates": "",
"factoryTemplates": "",
"controllerTemplates": "",
"decoratorTemplates": "",
"providerTemplates": "",
"routeTemplates": ""
}
}
And in client/app/app.js
what does your angular.module('app',[...])
declaration look like?
Ow dude, I love you! I didn't add it there. That's my bad. Thanks for the help everyone! :) It's just these little things...
Haha, not a problem. Glad to hear you have it working now :)
@kingcody Dude you're awesome in 2015 too :)
Hello guys, I am having troubles with using NgInfiniteScroll here. If I try to use it in my module I get very cool error in the console, the "Failed to instantiate module myApp due to: [$injector:unpr] Unknown provider: $stateProvider". What's so bad in my code, which is:
I tried everything I can think of. Sorry about this stupid question but...