Comments (6)
We should probably disallow creating module that has the same name as the app... Sounds like a bad idea to me. Opinions?
from mean.
Agreed. In any case it'd be interesting to know the cause tho
from mean.
Strange... it worked fine w/ 'fake'. It's something w/ the name 'docs' itself.
from mean.
@aarosil I actually discovered the error when trying to create a module “doctors” inside my app, named Doctors.
As to wether it’s a bad idea or not I’m really not in a place to judge right now. But it made sense to my case and it was really annoying to figure out what the problem was and even more so having to change the name of the app or the model to work around it.
from mean.
Just a quick look at the code (I might be wrong). Since the main angular module is set to the app name, it uses the module setter in public/js/config.js. That is where the injector sets up all the dependencies (angular.module('appname', [dependency modules]) . Once a module is set, you need to use the getter version of module to add to that (angular.module('appname')). If you use the setter version again you mess things up (I learned that). So when the meanjs:crud-module yeoman process tries to use the same module name as the the appname, it screws up the injected modules for the overall angular module.
Two options: either prohibit a crud-module with the same name as the app, or return to the original way of naming modules with prepending the appname... mean.core mean.article mean.mean etc. (unless that breaks something in a way I'm not seeing)
With the valid example @svallory gives, I would think we would prefer not preventing the developer from doing what makes sense to them in their project. and going the second route.
from mean.
@svallory indeed an issue, we'll take care of it in the next version.
@revdave33 you're right, I also prefer the second option.
from mean.
Related Issues (20)
- tion HOT 1
- Is MEAN.js still maintained? HOT 8
- missing apt package to install
- error when deploy to heroku
- Gulp tasks broken after upgrading to Gulp v4
- Travis CI fails on Windows build
- "npm install" fails on macOS mojave HOT 1
- npm install fails with "error: ‘class v8::Object’ has no member named ‘ForceSet’" on node-sass with node v10.15.1 HOT 5
- How is the Authentication process working in the meanjs? Where does the process flow starts when a website is loaded which file gets loaded and what are the files that are called in an orderly manner while checking authenicaton?
- Any free server available for deploy small mean stack application.
- Is MEAN.JS planning to upgrade framework with Angular2+ if yes then when it could be done if not then what about AngularJS abandaon thing?
- npm install error according the mean's doc! HOT 1
- How to connect two different databases from mongoose for the same project HOT 2
- Improving speed of MEAN Stack application HOT 1
- RPi4 ubuntu-standard default installation permission issue HOT 1
- Getting started guide using mac doesn't work HOT 2
- Getting errors on npm install and npm start on Windows HOT 5
- meanjs stack failled submit form
- meanjs stack failled submit HOT 7
- Question about Future HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mean.