last day (14 days later) » 

7:08 AM
1
A: Getting $injector:modulerr error using angular.js

Sarjan DesaiYou forgot to add require dependancy in controller to inject. Replace loginAdmin.controller('loginController',function($scope,$http,$window){ To loginAdmin.controller('loginController',['$scope','$http','$window',function($scope,$http,$window){ and replace var loginAdmin=angular.module('Chann...

 
@ Sarjan : I added as per you but still its throwing another error but 1st error has gone.Error-` errors.angularjs.org/1.4.6/ng/…`
 
Varity that you have added all js file in index.html...and check the updated answer
 
@ Sarjan : I updated as per you but still error was there.After removing '$scope','$http','$window' from line loginAdmin.controller('loginController','$scope','$http','$window',function($sc‌​‌​ope,$http,$window){ and made it to loginAdmin.controller('loginController',function($scope,$http,$window){ it worked properly.
@ Sarjan : another one problem it is not redirecting to dashboard page and showing error The requested URL /Gofast/dashboard was not found on this server.
 
In your code location.href='dashboard/'; should be location.href='/dashboard';
 
@ Sarjan : No,If i am doing as per you after successfully login the url is becoming http://oditek.in/dashboard which is wrong,It should http://oditek.in/Gofast/dashboard like this.Here i need when user will logged in he will move to another page.
 
7:08 AM
What is current URL before redirect?
 
hi
this is now the current url
this is the login page
 
then try 'Gofast/dashboard'
 
after adding this it became oditek.in/Gofast/Gofast/dashboard after login
 
I have tried below code in new blank window's console
window.location = http://oditek.in/GoFast
and then
window.location = Gofast/dashboard
 
here i want to totaly display the dashboard.html page after login.I am not binding inside any ng-view
 
7:15 AM
That's fine
 
you can visit oditek.in/Gofast site check there my code in view-page source .
If any wrong there please inform me
Here i am using Apache server
Are you there ?
 
ok
 
There are certain things wrong
if($scope.user_name==''){
alert('user name filed should not keep blank');
}else if($scope.user_pass==''){
alert('password filed should not keep blank');
}
in above code if you put break point on if condition $scope.user_name shows undefined
$scope.user_name = '';
$scope.user_pass = '';
Add two line above $scope.user_login=function(){
 
i know this ,I can make this correct but i need help about that routing problem'
ok i added as per you
 
7:24 AM
routing is working fine as per your requirement
main url is oditek.in/Gofast
 
ok
 
and redirect me to oditek.in/Gofast/dashboard
I think that's what you want
 
yes..i can redirect but the required page is not coming
 
Because that is not how routeprovider work
 
ok..Is there any other solution
?
you can help
 
7:28 AM
where is dashboard.html?
 
it is inside the root folder
 
I'm not able to find it
 
means my dashboard.html file is present inside my root folder where index.html is present
check loginRoute.js file
 
Yes but it is not showing me
if it is not showing then browser not able to find it and so it shows 404
Discuss you after an hour
 
ok sure...
 
8:27 AM
hii
Are you there ?
 
Hi
does your problem solved?
 
No,still i am trying
I think i have to merge all page inside index.html
like for login login.html and dashboard dashboard.html
 
no, you have to make separate file for each
look this link:
 
Right now what i am doing after user logged in i want to display another page
 
Got it..follw the link and try..and update for after you implement based on link
 
8:41 AM
What is the solution now
 
seprate the file from index.html and then try
 
ok..so i think for whole project i have to implement only one module
 
26
Q: How to config routeProvider and locationProvider in angularJS?

vzhenI want to active html5Mode in angularJS but I don't know why it not working. Any wrong with my codes? angular .module('myApp',[]) .config(function($locationProvider, $routeProvider) { $locationProvider.html5Mode(true); $routeProvider.when('/', { templateUrl: 'p...

 
 
2 hours later…
10:17 AM
I think your problem is solved...
I have checked your site...
 

last day (14 days later) »