Questions tagged [angularjs-routing]

Use for ngRoute, the built-in routing module in AngularJS, which can map the browser URL to a defined route.

Is used for deep-linking URLs to controllers and views (HTML partials).
It watches $location.url() and tries to map the path to an existing route definition.

Routes can be defined through the $routeProvider API. The $route service is typically used in conjunction with ngView directive and the $routeParams service.

See:

Related tags

1283 questions
-1
votes
2 answers

NgRoute not working

For some reason im not sure about my ngRoute here is not working properly. Please help me thankyou. Here is my cloud9 file where you can see live preiview and edit code. And here is my script.js: var app = angular.module('ChattApp', ["firebase",…
amanuel2
  • 4,508
  • 4
  • 36
  • 67
-1
votes
2 answers

What is the meaning of the square brackets in “.module("modulename", […])” of AngularJS

I just saw an example of routing in AngularJS. I would like to know the relation ship between dependency 'ngRoute' and module mainApp, in synatx var mainApp = angular.module("mainApp", ['ngRoute']);. Previously I've seen examples with empty square…
jsh6303
  • 2,010
  • 3
  • 24
  • 50
-1
votes
2 answers

Angular app displays one page but not the other

I have an Angular app with 2 partials (one to log in and one to post messages). So why does Posts work but Login doesn't? Console doesn't give me anything. Plunker: http://plnkr.co/edit/tPbHaUrn73wGUPsY8mqo?p=preview Angular app: …
BelgoCanadian
  • 893
  • 1
  • 11
  • 31
-1
votes
1 answer

Angular Routing in ASP.NET MVC combined

I m having one index page and one child page. In my index page, I m trying to render my child. but somehow things not working as expected and Angular routing not working as expected Here is my index page @{ ViewBag.Title = "Index"; Layout =…
TechQuery
  • 253
  • 3
  • 17
-1
votes
1 answer

playframwork angularjs router

I have an application with AngularJS on top of Play frameework. Want to use Play framework for services only. How do I make my angularjs routing work? My applicaton is always looking into in Play routes and never looks into Angularjs routes and so…
Shiva Kodityala
  • 105
  • 1
  • 10
-1
votes
1 answer

AngularJS routing parameters

friendID = 1234; $route.when( "/friends/:friendID/raw", { event: "friends.view" } ); When I run the above the URL in Chrome Dev Tools shows that the url tried is http://domain.com/friends/raw?0=1&1=2&2=3&3=4 is there a way to…
ngplayground
  • 20,365
  • 36
  • 94
  • 173
-1
votes
1 answer

How to use templateUrl in AngularJS?

in my file home.js have .state('app.profile', { url : '/profile', views : { 'appContent' : { templateUrl: '../templates/profile.html', controller: 'HomeController' } } }) in my file profile.html…
Cấn Cát
  • 11
  • 1
  • 3
-1
votes
1 answer

Angular JS - Route provider not working

Help me with this plunk http://plnkr.co/edit/9WSWSgp55j614tBd2qbJ?p=previewGo to above plunk and check it out pls am getting blank screen when using routing but its working fine when its not
-1
votes
2 answers

Browser's back button doesn't work without refresh in Angular app

I have an Angular app, which has several ng-controllers and several templates. And here is a snippet of my routing: when('/claims', { templateUrl: '/angular_templates/index', controller: 'ClaimsController', resolve: { rootClaims:…
Sergey
  • 345
  • 3
  • 12
-1
votes
1 answer

Strore urls in a separate file

I am working on Angular Routing and have URLs hardcoded directly in my javascript file. However, I would need to keep these URLs in a separate file, where should I keep it preferably? I can't map them with variables in XML or java given that I am…
user3137592
  • 103
  • 3
  • 14
-1
votes
1 answer

Angular JS: how to change view in ng-view

I have navbar,sidebar and container. for each item in navbar have different sidebar. Ex: - If i click Nav A, it have sidebar A, B, C. - and if i click Nav B, it have sidebar D, E, F and for each sidebar have different data in container. anyone…
catax
  • 3
  • 1
-1
votes
2 answers

POST 404 Not found.. Angular js

here i'm sending data through $http.post to data/user.php app.factory('loginService',function($http){ return{ login:function(data,scope){ var $promise=$http.post('data/user.php',data); //send data to user.php …
-1
votes
1 answer

AngularJS $location object doesn't have the path() function

For some reason my $location object doesn't have the path function when calling in my controller. Someone an idea? E: here the Controller erpmApp.controller('dashboardCtrl', ['$scope', '$http', '$parse','$swipe', '$location', '$rootScope', 'Page',…
Johnny000
  • 2,058
  • 5
  • 30
  • 59
-1
votes
2 answers

AngularJS returned 404 error if I typed the URL

I have an angularjs application hosted in my local IIS with route configured. For example '/services' will use servicesController and services.partial.html view. It worked well if I clicked the link on the main page and the browser address changed…
Shaun Xu
  • 4,476
  • 2
  • 27
  • 41
-1
votes
1 answer

Switching between views on same controller

I've got a page that says "GENERATE", and it has a form on it. And then you submit the form by pressing the Generate button, and I want it to take you to a new view called "LOADING" whilst it waits for the result to come back from the server, then…
b0xxed1n
  • 2,063
  • 5
  • 20
  • 30
1 2 3
85
86