tag:blogger.com,1999:blog-6082652835152798567.post8351228422671365391..comments2024-03-18T11:30:52.140-07:00Comments on Sql server, .net and c# video tutorial: Angularjs route configurationUnknownnoreply@blogger.comBlogger28125tag:blogger.com,1999:blog-6082652835152798567.post-53629522449469862172021-06-24T09:59:02.224-07:002021-06-24T09:59:02.224-07:00Thank you , '#!/home' works for me, but do...Thank you , '#!/home' works for me, but don't understand why ?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-34274038516131866572021-05-04T10:50:23.386-07:002021-05-04T10:50:23.386-07:00thank you it works for me href="#!/home"...thank you it works for me href="#!/home" for a_tag is correctAnonymoushttps://www.blogger.com/profile/02088821849159292199noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-48086063217553283722020-10-30T10:14:34.941-07:002020-10-30T10:14:34.941-07:00Hello friends,
I'm very late to ask anything ...Hello friends,<br /><br />I'm very late to ask anything on this tutorial and sorry about that. I followed twice this 3 videos but still unable to get the result as I should get it. first of all, json(StudentService.asmx) working absolutely fine. when I'm testing 3 html files separately its not working, I mean it is not displaying the either course data nor student data. The same way index.html file is also not displaying anything when click on home, course, student links.<br /><br />Any help would be much appreciated. Anonymoushttps://www.blogger.com/profile/11882997845093327770noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-47337941573101900522019-11-21T06:11:18.452-08:002019-11-21T06:11:18.452-08:00Hi Venkat Sir,
I have implemented the above examp...Hi Venkat Sir,<br /><br />I have implemented the above example only with 2 pages Home and courses as I don't have VS and SQL. I'm getting below error message when I'm clicking on Home or Courses link.<br /><br />GET http://127.0.0.1:5500/Templates/home.html 404 (Not Found)<br />(anonymous) @ angular.js:13562<br />sendReq @ angular.js:13288<br />serverRequest @ angular.js:13029<br />processQueue @ angular.js:17945<br />(anonymous) @ angular.js:17993<br />$digest @ angular.js:19112<br />$apply @ angular.js:19500<br />(anonymous) @ angular.js:15301<br />defaultHandlerWrapper @ angular.js:3824<br />eventHandler @ angular.js:3812<br />angular.js:15567 Error: [$templateRequest:tpload] Failed to load template: Templates/home.html (HTTP status: 404 Not Found)<br />https://errors.angularjs.org/1.7.8/$templateRequest/tpload?p0=Templates%2Fhome.html&p1=404&p2=Not%20Found<br /> at angular.js:138<br /> at handleError (angular.js:21397)<br /> at processQueue (angular.js:17945)<br /> at angular.js:17993<br /> at Scope.$digest (angular.js:19112)<br /> at Scope.$apply (angular.js:19500)<br /> at done (angular.js:13343)<br /> at completeRequest (angular.js:13600)<br /> at XMLHttpRequest.requestLoaded (angular.js:13505)<br />(anonymous) @ angular.js:15567<br />(anonymous) @ angular.js:11846<br />handleError @ angular.js:21401<br />processQueue @ angular.js:17945<br />(anonymous) @ angular.js:17993<br />$digest @ angular.js:19112<br />$apply @ angular.js:19500<br />done @ angular.js:13343<br />completeRequest @ angular.js:13600<br />requestLoaded @ angular.js:13505<br />load (async)<br />(anonymous) @ angular.js:13488<br />sendReq @ angular.js:13288<br />serverRequest @ angular.js:13029<br />processQueue @ angular.js:17945<br />(anonymous) @ angular.js:17993<br />$digest @ angular.js:19112<br />$apply @ angular.js:19500<br />(anonymous) @ angular.js:15301<br />defaultHandlerWrapper @ angular.js:3824<br />eventHandler @ angular.js:3812<br /><br />Do we really need Visual Studio and web.config file to get this example work. <br /><br />Please advise.<br />Ashish Swamihttps://www.blogger.com/profile/12170232115115823234noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-50242248938222936112019-11-20T19:45:54.724-08:002019-11-20T19:45:54.724-08:00Hi in 1.7.x version we are getting this error. Ins...Hi in 1.7.x version we are getting this error. Instead refer 1.2.x for both angular.min.js amd angular-route.min.js. Then the navigation works for Home, Courses, StudentsAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-65274523498881747822019-08-20T00:15:42.592-07:002019-08-20T00:15:42.592-07:00var myApp = angular.module("myModule", [...var myApp = angular.module("myModule", ["ngRoute"]).config(function ($routeProvider) {<br /><br /> $routeProvider.when("/home", { templateURL: "Templates/home.html", controller: "homeController" })<br /> .when("/courses", { templateURL: "Templates/courses.html",controller:"coursesCountroller" })<br /> .when("/students", { templateURL: "Templates/students.html", controller: "studentsController" })<br /> .controller("homeController", function ($scope) {<br /><br /><br /> $scope.message = "Home Page!!";<br /> <br /><br /> })<br /> .controller("coursesController", function ($scope) {<br /><br /> $scope.courses = ["ASP.NET","C#","VB.NET","SQL Server"];<br /><br /> })<br /> .controller("studentsController", function ($scope, $http)<br /> {<br /> $http.get("StudentService.asmx/StudentData").then(function (response) {<br /><br /> $scope.students = response.data;<br /> <br /><br /> })<br /><br /><br /> })<br /> <br />});<br /><br /><br />The links are not getting loaded and I m getting this error:Error: $injector:modulerr<br />Module Error<br />Failed to instantiate module myModule due to:<br />TypeError: $routeProvider.when(...).controller is not a function<br /><br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-91905566212213153232019-06-23T11:15:22.178-07:002019-06-23T11:15:22.178-07:00my problem is solved, i simply added cdn link and ...my problem is solved, i simply added cdn link and problem solved but why we use cdn if we have local script file and if i use local script file it doesn't work. please anybody tell me the reason...<br />Mayur Naktodehttps://www.blogger.com/profile/06765631039598651923noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-6536388163232886732019-06-23T11:08:46.641-07:002019-06-23T11:08:46.641-07:00hello sir,
AngularJs/index.html#!/
AngularJs/index...hello sir,<br />AngularJs/index.html#!/<br />AngularJs/index.html#!/#%2Fstudents<br /><br />I am getting this error please help me i reffered video no 26 route configurationMayur Naktodehttps://www.blogger.com/profile/06765631039598651923noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-38003784932872016192019-04-09T05:49:07.983-07:002019-04-09T05:49:07.983-07:00Hi Aj,
I placed the same code what you are said a...Hi Aj,<br /><br />I placed the same code what you are said above, but is not working for me. May i know what is the reason?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-7322630660515554252018-07-07T08:38:16.988-07:002018-07-07T08:38:16.988-07:00how to remove # tag without using asp bcz this tut...how to remove # tag without using asp bcz this tutorial using asp<br />but i want without aspAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-32151886555888105462018-05-12T04:22:13.410-07:002018-05-12T04:22:13.410-07:00Thanks Bhoopendra. Your Fix worked for me.Thanks Bhoopendra. Your Fix worked for me.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-15408842512820040932018-05-06T21:37:24.063-07:002018-05-06T21:37:24.063-07:00Thank you , '#!/home' works for meThank you , '#!/home' works for me Omar Adnan Isaidhttps://www.blogger.com/profile/14073273978004495341noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-13853426279919189102017-12-14T09:25:14.606-08:002017-12-14T09:25:14.606-08:00Am did not getting the list of the student when i ...Am did not getting the list of the student when i click the student link the other two links mean home and courses can anyone help me...???Hamid Nawazhttps://www.blogger.com/profile/08123677910907995412noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-26420730521751579232017-09-18T08:00:18.237-07:002017-09-18T08:00:18.237-07:00This solution worked. ThanksThis solution worked. Thanksrahulhttps://www.blogger.com/profile/15798988801762544182noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-44534159900488856342017-04-16T14:44:37.428-07:002017-04-16T14:44:37.428-07:00After reading the post in AJ s comment. Change in...After reading the post in AJ s comment. Change in Angular 1-6. Either go with AJ's solution - or - make the href in anchor tags '#!/home' instead or '#/home'Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-54855332507952809812017-04-16T14:30:10.361-07:002017-04-16T14:30:10.361-07:00Thanks AJ, I don't understand it but that got...Thanks AJ, I don't understand it but that got it to work! These videos have been awesome, but I will definitely need more ngRoute examples / practice to get my head around this.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-64273103816850278112017-01-15T20:25:25.288-08:002017-01-15T20:25:25.288-08:00The links were not working for me so I came to kno...The links were not working for me so I came to know that angular 1.6.1 core and route files have some problem. so here is my JS code to that fixed the links.<br /><br />/// <br /><br />var app = angular.module('Demo', ['ngRoute'])<br /> .config(function ($routeProvider, $locationProvider)<br /> {<br /> $locationProvider.hashPrefix('');//this helped fix a bug with angular 1.6.1 http://stackoverflow.com/questions/41211875/angularjs-1-6-0-latest-now-routes-not-working the routing links were not working but this $locationProvider variable change fixed it.<br /> $routeProvider<br /> .when('/home', {<br /> templateUrl: 'Templates/home.html',<br /> controller: 'homeController'<br /> })<br /> .when('/courses', {<br /> templateUrl: 'Templates/courses.html',<br /> controller: 'coursesController'<br /> })<br /> .when('/students', {<br /> templateUrl: 'Templates/students.html',<br /> controller: 'studentsController'<br /> });<br /> })<br /> .controller('homeController', function ($scope)<br /> {<br /> $scope.message = 'Home Page';<br /> })<br /> .controller('coursesController', function ($scope)<br /> {<br /> $scope.courses = ['C#', 'VB.NET', 'SQL Server', 'ASP.NET'];<br /> })<br /> .controller('studentsController', function ($scope, $http)<br /> {<br /> $http.get('Part25StudentService.asmx/GetAllStudents')<br /> .then(function (response)<br /> {<br /> $scope.students = response.data;<br /> });<br /> });Ajnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-86224242901675240942017-01-07T07:38:23.942-08:002017-01-07T07:38:23.942-08:00Hi,
I also faced the same error.
Did followed th...Hi, <br />I also faced the same error. <br />Did followed this to get rid of this issue,<br />- removed # from leftmenu as below..<br /> "<br /> <a href="/home" rel="nofollow">Home</a><br /> <a href="/courses" rel="nofollow">Courses</a><br /> <a href="/students" rel="nofollow">Students</a><br /> "<br />- added base tag in tag of index page.<br /> <br />- Enabled 'html5Mode' using $locationProvider service in script.js <br /> <br /> .config(function ($routeProvider, $locationProvider) {<br /> $routeProvider<br /> .when("/home", {<br /> templateUrl: "Templates/Home.htm",<br /> controller: "homeController"<br /> })<br /> .when("/courses", {<br /> templateUrl: "Templates/Courses.htm",<br /> controller: "coursesController"<br /> })<br /> .when("/students", {<br /> templateUrl: "Templates/Students.htm",<br /> controller: "studentsController"<br /> })<br /><br /> $locationProvider.html5Mode({ enabled: true<br /> });<br /> })<br /><br /><br /><br />try this if it works for you as well.<br /><br />Thanks,Anonymoushttps://www.blogger.com/profile/17794854877472122867noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-71794727101315606952017-01-06T23:29:34.119-08:002017-01-06T23:29:34.119-08:00Where to add Controllers Name in index.html?Where to add Controllers Name in index.html?Ramdasnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-84083171064566574122017-01-05T07:45:45.255-08:002017-01-05T07:45:45.255-08:00Hi All,
Plesae user angular-route.min.js from sta...Hi All,<br /><br />Plesae user angular-route.min.js from stable version which is currently 1.2.32 version as latest version is showing compile time errors in eclipse in the Dyanamic Web Application.<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-20302660748173911272016-12-30T05:23:05.803-08:002016-12-30T05:23:05.803-08:00Guys try to add cdn link. problem got solved!........Guys try to add cdn link. problem got solved!.....<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-85443514443969443812016-12-22T18:38:29.518-08:002016-12-22T18:38:29.518-08:00hello sir,
AngularJs/index.html#!/
AngularJs/i...hello sir,<br /> AngularJs/index.html#!/<br /> AngularJs/index.html#!/#%2Fgreen<br /> <br /> this kind of error happen in URL when I click to link. <br /> please help me sumit dashttps://www.blogger.com/profile/01089878029389657792noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-12129127312646966532016-12-19T05:34:03.764-08:002016-12-19T05:34:03.764-08:00great site for the angular learnersgreat site for the angular learnersAnonymoushttps://www.blogger.com/profile/03263278827026623174noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-38185094651767758342016-11-30T21:34:37.489-08:002016-11-30T21:34:37.489-08:00i have done this example form video 23-25 after ex...i have done this example form video 23-25 after execution navigation are not working then template is not loading. can any one help in this. <br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-11308080222733658722016-11-30T08:51:01.154-08:002016-11-30T08:51:01.154-08:00Hello, great videos - really helpful, but I have a...Hello, great videos - really helpful, but I have a problem, I use VS2015 professional with resharper 10 (if I remember correctly for it) and on the links section I get (with resharper on) id cannot be resolved ( <a href="#/home" rel="nofollow"> Home</a> for example) and then, when I turn off the resharper I do not get the message anymore, bu I cannot see the partial template either... :< Can someone please help me with this, because these are cool tutorials. :) Great work man!Anonymousnoreply@blogger.com