I'm trying to build an application with Angular but I've run into an error that I'm unsure how to resolve. It seems to have something to do with the routing that I have set up.
As soon as the page loads it is forced by the routing to go to the first view, which is what I want it to do, but it is throwing a weird error...
Error: [ng:areq] http://errors.angularjs.org/1.2.19/ng/areq?p0=LoginController&p1=not%20aNaNunction%2C%20got%20undefined
at Error (native)
The best way I could get your hands on my code is to load it into GitHub. You can find my repository here...
https://github.com/JosephEricDavis/TimeTrack
It's pretty simple and strait forward so far. Not a lot of code to dig through yet. Can anybody see what I'm doing wrong?
Thanks
Well, that's pretty embarrassing. As miqid mentioned in the comment, I had forgotten to include script tag references to my controller files.
Related
My code works on development mode, uncompressed. But when I use grunt's minify functionality and run the app in production mode, I get that error: Uncaught TypeError: angular.module(...).run(...) is not a function.
When I look into the error in Google Chrome Developer Tools, I get what you see in the screenshot. Does anybody understand where the problem is?
I am using Angular 1.4+ in Angular-Fullstack. The error occurs in vendor.{{randomstring}}.js.
Thanks for any support!
You have 2 issues here.
Dependency injection. You can edit manually the archives or use https://github.com/mgol/grunt-ng-annotate this will do this automagically for you.
Concatenation. Check this grunt plugin https://github.com/gruntjs/grunt-contrib-concat the issue here is javascript dont understand when a function end/start because dont have a separation mark, check where the error is.
})(function(a,b) {
It should be:
});(function(a,b) {
Check the "Concatenating with a custom separator" example of grunt-contrib-concat
I am afraid that I can't post code, as there is too much of, but am hoping that someone will recognize my problem.
I have an existing, working app, which I want to use as the basis for a new one.
So, I copied all of localhost/<some directory>/App1 to localhost/<some directory>/App2, but when I try to load the app, I get Uncaught ReferenceError: angular is not defined(…)
I just don't understand it. I have copied the entire directory and changed nothing. The first app still works fine, but the copy gives that error.
Any idea what I am doing wrongly?
I've been developing a simple app in Ionic 2 and I tried using mock service (in-memory web API) for fetching data as described in this Angular 2 tutorial. My console reported this error:
TypeScript error: app/app.ts(11,49): Error TS2307: Cannot find module
'angular2-in-memory-web-api'.
I tried this solution: angular2-in-memory-web-api 404 error. After running this: npm i angular2-in-memory-web-api --save, I was unable to find the files where I was supposed to use the code provided in the rest of the solution.
How can I fix this? Sorry if the question is not posed quite right, this is my first one. Please ask if any additional information is needed. The problem is pretty much the same as the one for which the solution was provided in the link above, except that using Ionic 2 makes the given solution inapplicable in my case. I'm don't think SystemJS is being used, please see my file structure image.
Image of my file structure.
Everytime when i have syntax error, kohana show this:
HTTP_Exception_404 [ 404 ]: Unable to find a route to match the URI
Why? Before i see my syntax error...
My route is fine, whats happening is that every time there is some sort of syntax error , instead of showing the error stack it's telling me that it can't find the route. I think with the older versions of Kohana I was able to see that
I guess it's pretty normal that you don't see a syntax error, because kohana don't know where to start your application.
Go to your bootstrap file in the application folder and fix that specific route.
Im here trying to find out how to solve this little problem.
I've been working with Sencha Touch v2.1 to create all my views and stuff.
After that, i started working with Sencha Command v3.0.0.250 to improved performance in my app, but after Sencha C. do its own business and try to open the index.html (throw IIS) something like that occurrs. (using chrome)
"Error evaluating http:// localhost/Production/app.js with message: TypeError: Cannot call method 'substring' of undefined "
Whats going on? What substring is talking about?
Thanks in advance!
Ensure that you see no warning messages in the Console since you have to add requires following by the classes you will be using before building it.