Giter Site home page Giter Site logo

digitalmachinist / loopback-angular-ui-router Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 4.0 121 KB

A starter pack for creating websites hosting a LoopBack REST API presented using an AngularJS and Bootstrap (CSS) frontend.

License: MIT License

JavaScript 69.09% ApacheConf 24.01% HTML 6.53% CSS 0.37%

loopback-angular-ui-router's People

Contributors

digitalmachinist avatar romulocintra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

loopback-angular-ui-router's Issues

Tests Fail

I'm trying to use this project and am getting errors during grunt testing regarding gitWritingApp despite the commit logs saying that module has been removed:

Errors:

INFO [karma]: Karma v0.12.37 server started at http://localhost:8080/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 45.0.2454 (Windows 7 0.0.0)]: Connected on socket aFZm5L8SP6nAcwUyItMJ with id 18391702
Chrome 45.0.2454 (Windows 7 0.0.0) Module: gitWritingApp Controller: MainCtrl should attach a list of awesomeThings to the scope FAILED
Error: [$injector:modulerr] Failed to instantiate module gitWritingApp due to:
Error: [$injector:nomod] Module 'gitWritingApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.4.6/$injector/nomod?p0=gitWritingApp
at E:/Dvlp/AngularJS/loopback-angular-ui-router/loopback-angular-ui-router/app/bower_components/angular/angular.js:68:12
at E:/Dvlp/AngularJS/loopback-angular-ui-router/loopback-angular-ui-router/app/bower_components/angular/angular.js:1986:17
at ensure (E:/Dvlp/AngularJS/loopback-angular-ui-router/loopback-angular-ui-router/app/bower_components/angular/angular.js:1910:38)
at module (E:/Dvlp/AngularJS/loopback-angular-ui-router/loopback-angular-ui-router/app/bower_components/angular/angular.js:1984:14)
at E:/Dvlp/AngularJS/loopback-angular-ui-router/loopback-angular-ui-router/app/bower_components/angular/angular.js:4388:22
at forEach (E:/Dvlp/AngularJS/loopback-angular-ui-router/loopback-angular-ui-router/app/bower_components/angular/angular.js:336:20)
at loadModules (E:/Dvlp/AngularJS/loopback-angular-ui-router/loopback-angular-ui-router/app/bower_components/angular/angular.js:4372:5)
at Object.createInjector as injector
at Object.workFn (E:/Dvlp/AngularJS/loopback-angular-ui-router/loopback-angular-ui-router/app/bower_components/angular-mocks/angular-mocks.js:2427:52)
http://errors.angularjs.org/1.4.6/$injector/modulerr?p0=gitWritingApp&p1=Error%3A%20%5B%24injector%3Anomod%5D%20Module%20'gitWritingApp'%20is%20not%20available!%20You%20either%20misspelled%20the%20module%20name%20or%20forgot%20to%20load%20it.%20If%20registering%20a%20module%20ensure%20that%20you%20specify%20the%20dependencies%20as%20the%20second%20argument.%0Ahttp%3A%2F%2Ferrors.angularjs.org%2F1.4.6%2F%24injector%2Fnomod%3Fp0%3DgitWritingApp%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fapp%2Fbower_components%2Fangular%2Fangular.js%3Fe9c46e66ca534bf6008860176d93bae434687fb7%3A68%3A12%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fapp%2Fbower_components%2Fangular%2Fangular.js%3Fe9c46e66ca534bf6008860176d93bae434687fb7%3A1986%3A17%0A%20%20%20%20at%20ensure%20(http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fapp%2Fbower_components%2Fangular%2Fangular.js%3Fe9c46e66ca534bf6008860176d93bae434687fb7%3A1910%3A38)%0A%20%20%20%20at%20module%20(http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fapp%2Fbower_components%2Fangular%2Fangular.js%3Fe9c46e66ca534bf6008860176d93bae434687fb7%3A1984%3A14)%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fapp%2Fbower_components%2Fangular%2Fangular.js%3Fe9c46e66ca534bf6008860176d93bae434687fb7%3A4388%3A22%0A%20%20%20%20at%20forEach%20(http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fapp%2Fbower_components%2Fangular%2Fangular.js%3Fe9c46e66ca534bf6008860176d93bae434687fb7%3A336%3A20)%0A%20%20%20%20at%20loadModules%20(http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fapp%2Fbower_components%2Fangular%2Fangular.js%3Fe9c46e66ca534bf6008860176d93bae434687fb7%3A4372%3A5)%0A%20%20%20%20at%20Object.createInjector%20%5Bas%20injector%5D%20(http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fapp%2Fbower_components%2Fangular%2Fangular.js%3Fe9c46e66ca534bf6008860176d93bae434687fb7%3A4297%3A11)%0A%20%20%20%20at%20Object.workFn%20(http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fapp%2Fbower_components%2Fangular-mocks%2Fangular-mocks.js%3Fa6f60920a9e460d21052862d777b6f079abcf5a0%3A2427%3A52)%0A%20%20%20%20at%20attemptSync%20(http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F578a1e5ff14db21b04e2d6db7fd0eda37042440c%3A1789%3A24)
at E:/Dvlp/AngularJS/loopback-angular-ui-router/loopback-angular-ui-router/app/bower_components/angular/angular.js:68:12
at forEach (E:/Dvlp/AngularJS/loopback-angular-ui-router/loopback-angular-ui-router/app/bower_components/angular/angular.js:336:20)
at loadModules (E:/Dvlp/AngularJS/loopback-angular-ui-router/loopback-angular-ui-router/app/bower_components/angular/angular.js:4372:5)
at Object.createInjector as injector
at Object.workFn (E:/Dvlp/AngularJS/loopback-angular-ui-router/loopback-angular-ui-router/app/bower_components/angular-mocks/angular-mocks.js:2427:52)
at E:/Dvlp/AngularJS/loopback-angular-ui-router/loopback-angular-ui-router/app/bower_components/angular/angular.js:4411:15
TypeError: Cannot read property 'awesomeThings' of undefined
at Object. (E:/Dvlp/AngularJS/loopback-angular-ui-router/loopback-angular-ui-router/test/spec/controllers/main.js:20:20)
Chrome 45.0.2454 (Windows 7 0.0.0): Executed 1 of 1 (1 FAILED) ERROR (0.034 secs / 0.029 secs)
Warning: Task "karma:unit" failed. Use --force to continue.

Aborted due to warnings.

Cannot find a model when generating angular classes with grunt or lb-ng

I started to customized the scaffold project adding loopback-component-passport and a basic user authentication system (I've already done directly in loopback and it works).

I added a new model in /common/models/user-credential.json like so

{
"name": "userCredential",
"plural": "userCredentials",
"base": "UserCredential",
"properties": {},
"validations": [],
"relations": {
"user": {
"type": "belongsTo",
"model": "AppUser",
"foreignKey": "userId"
}
},
"acls": [],
"methods": {}
}

and updated model-config.json like so

{
"_meta": {
"sources": [
"loopback/common/models",
"loopback/server/models",
"../common/models",
"./models",
"./node_modules/loopback-component-passport/lib/models"
],
"mixins": [
"loopback/common/mixins",
"loopback/server/mixins",
"../common/mixins",
"./mixins"
]
},
"userCredential": {
"dataSource": "db",
"public": false
},....

Even if the new "sources" field for passport is correctly defined when launching grunt or lb-ng I get an error that userCredential cannot be found.....

Any hint?

How to enable loopback api explorer again?

Could someone help me activating the Loopback Api Explorer on the scaffold project?
I think it's a routing problem. I've added npm loopback-component-explorer to package.json
and modified app.start in server.js like this

app.start = function () {
// start the web server
return app.listen( function () {
app.emit( 'started' );
var baseUrl = app.get('url').replace(//$/, '');
console.log('Web server listening at: %s', baseUrl);
if (app.get('loopback-component-explorer')) {
var explorerPath = app.get('loopback-component-explorer').mountPath;
console.log('Browse your REST API at %s%s', baseUrl, explorerPath);
}
} );

but still it's impossible to access to the explorer.
Please help

grunt server not grunt serve

Thanks for the great project! I love loopback, and have been banging my head trying to get it working with an angular generator.

In the docs you have:

grunt serve

But the task is called server. grunt serve gets me no joy, but

grunt server

Works as expected.

Thanks again!

Warning: Task "serve" not found.

I'm getting the message:

Warning: Task "serve" not found.

when I run grunt serve. The app works fine with node . command. Maybe the gruntfile is not being generated properly?

Anyway, this is an awesome generator. Congrats!

Does not automatically include the LoopBack module in app.js

When I added my first model to be accessed from the app, I was getting errors when trying to use that model in a controller in the client. Adding 'LoopBack' as a module requirement fixed it. Maybe this is totally obvious to people, but as someone relatively new to Angular, Node, and LoopBack, it threw me for a couple hours. Maybe it would be appropriate to automatically include it? Like so?

angular
.module( 'yourApp', [
'ngResource',
'ui.router',
'LoopBack'
] )
.config...

Building with bootstrap 4.

Any chance you could include flag for boostrap 4 vs 3?

I was about to build this same generator but would prefer latest. Such as boostrap 4 and at some point Angular 2 after beta.

Also I will do passport itntegration. If you would like I can share.

Cheers

Art

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.