The built-in routing object in AngularJS, which can map the browser URL to a defined route.

learn more… | top users | synonyms

1
vote
2answers
36 views

AngularJS routing works on W3Schools but nowhere else

I'm just learning AngularJS and I can't seem to get routing working no matter what I do, even copying examples verbatim. I'm basing it off the examples provided on W3Schools, such as: http://www....
0
votes
1answer
24 views

AngularJS variable does not persist to view

Having a strange bug here, I can succesfully switch to other views but my problem is that even a simple variable cannot "reach" the views. Does anyone see my (probably stupid) mistake? Index.html &...
1
vote
0answers
12 views

Does $routeOnChange placement matter for it to trigger?

Does it matter where we instantiate a $on listener with $routeOnChange? I currently have $rootScope.$on("$routeOnChange", myFunction) in two directives. In one directive the listener works fine when I ...
5
votes
4answers
45 views

$scope not working in my nav bar controller?

My Angular app is developed using a boilerplate of this yeoman generator. Routing and all things working fine but I could not get to working $scope only on navbar-controller.js and footer-controller....
-2
votes
1answer
48 views

angular.js:4640Uncaught Error: [$injector:modulerr] got this error

The above error i am getting when i run angularjs route simple application. I made separate folder for partial template. only three files are there that contains simple headings. below code for ...
0
votes
2answers
29 views

Cannot get ng-controller to work in angular app

I've just started learning web development on my own, and I've run into an issue where either my entire app or just a controller just won't cooperate. In prototype.js, I declare the app: var ...
1
vote
2answers
37 views

Angular ui-router render different component based on route params

Using Angular UI Router, I'm trying to render a different component based on a $state.params value, but I can't find a clean way to do this. I figured out a working solution already (with some ES2015 ...
0
votes
1answer
42 views

$route.routes prints URLs twice ,why?

i have created a basic app to learn angularJs routing. When i printed $routes.route to the browser console , this is what i saw : And this is my route configuration : almRequirement.config(...
4
votes
1answer
36 views

AngularJS Codeigniter base_url path settings

I am creating a website with Codeigniter 3 and AngularJs. While delevolping i have faced some issues with base url in codeigniter. Im attaching an image file of my directory struture. In my ...
0
votes
3answers
26 views

AngularJS SPA is not working in Web Api project

I have created a web api project and after that i am going to create single page application but getting some error so i am posting my code below: My angularjs code: var app = angular.module('myApp',...
0
votes
0answers
27 views

AngularJS Routing redirects to 404 page

I have the following routing configuration: $locationProvider.html5Mode().enabled = true; config file: define(function (require) { "use strict"; return ['$stateProvider', '$...
2
votes
1answer
19 views

Override the parent url with child url in UI-router (Angular)

This is the configuration i'm using for my ui-router: .state('parent', { url: '/child1' controller: ParentController, abstract: true }) .state('parent.child1', { url: '' }) .state('...
-1
votes
2answers
70 views

Routing is not working with AngularJS

As a part of learning process, I am roaming around angular js routing concepts. For this, I created one inner folder inside app with two sample test html pages .. When i run the app it should load ...
0
votes
2answers
21 views

Route does not work in angularJS

All the directories are setup perfectly but still routing doesn't work. Pages 'folder' contain two pages 'addOrder.html' and 'showOrder.html'. I also included file 'angular.min.js' but still no ...
0
votes
1answer
42 views

Angular js How to pass parameters to $location.path() and use this in $routeProvider for routing

On button click I have code to navigate. $s.onClick = function (pageObj) { $location.path('/Next'); } Here param pageObj is object containing link (ex: http://sample..), title and other key ...
0
votes
2answers
31 views

ui.router not showing the page [nested view]

I know this is a well asked question but may be my "googleing" skills are not good enough to get me what I want. So I have a page with ng-view that is the main index.html <div class="row" style="...
0
votes
0answers
8 views

Url loaded using routeprovider of angular js do not work at page reload with laravel

I am using angularjs frontend with laravel backend.When i click on link i can partially load some content. However when I am reloading the page, laravel shows a httpnotfoundexception error. I placed ...
0
votes
0answers
19 views

Maintain State of the view and edit using angular route

I am trying to build and application where I'll be having 2 users 1 will be having view right and other one will be having View + Edit right. There are "n" no of feilds in each page so I am thinking ...
1
vote
1answer
31 views

use ui-sref only if the parameter is defined

Here is my following code: view: <div class="single-user" ui-sref-active="activeState" ui-sref="app.usersingle({id:item[0].id})"> <li class="userTicket">Total: {{item[0]....
0
votes
0answers
21 views

How to route to Angular 2 component from Angular 1 app?

So I have Angular 1 app. And I have Angular 2 component; let's say Heroes Dashboard, dashboard.component.ts from https://angular.io/docs/ts/latest/tutorial. In Angular 2 router specified as list of: ...
0
votes
1answer
30 views

change css class depending on location path via controller

Can someone help me on how I can switch the css class of an element based on the url path in the controller? I tried to attempt this with code below, when I change the path to 'user' the class does ...
0
votes
1answer
31 views

AngularJS back/forward button update model/scope

I'm having an issue with AngularJS and URLS. When I press the back/forward buttons in the browser I want my models to update accordingly. As you can see from this page: http://www.networkwestmidlands....
1
vote
1answer
41 views

Routes in Angular Not working

Code <body ng-app="ngapp"> <h2>NG App</h2> <div> <ng-view></ng-view> </div> <script src="Scripts/angular.min.js"></script> <script>...
2
votes
3answers
85 views

Multiple named views with dynamic routing in angularjs

Edit: Here is the complete code at Plunker. Though I can not c anything in execution but same code working at local. However gives a console error though It all works perfect. But due to :id in /...
2
votes
1answer
31 views

Angularjs select controller and template dynamically

I want to make routes to access user profiles and pages which made by users like belows. http://example.com/username http://example.com/page_url This should identify in the routing process by ...
1
vote
1answer
16 views

Issue with using the same template for different states on ui-router

I'm trying to use the same template for 2 different views. My set up is this $stateProvider.state('me', { url: '/me', templateUrl: 'partial/profile/profile.html', controller: '...
0
votes
0answers
21 views

Passing Big Data between controllers with Angular Route Params

I'm building an ionic app. One page contains articles, and when a user clicks on the article they go to a page with the article. This is a snippet of my config for routing: .state('article_detail', ...
0
votes
1answer
65 views

angular-ui-router doesn't work

I doesn't manage to route using ui-router. It does work for me with ng-route, so I must have missed something basic. There is no error but I don't get any view. The following code does not work (...
0
votes
1answer
24 views

How to determine path/route in AngularJS to indicate current view in menu

I'm writing a small AngularJS app that uses Bootstrap. I'm using Boostraps Nav component and I want to highlight the current page's menu item. I need to be able to determine the path/route associated ...
0
votes
0answers
20 views

What does it mean exactly when we say “Dynamic Routing” in AngularJS

I have been working with AngularJS for last few Months. I heard this term "Dynamic Routing" from one of my colleague. He explained me little bit but not clear. Could anyone please explain me? Any ...
1
vote
2answers
42 views

Why UI router if I can use directives?

Well, I have never used and never felt like that I should use the UI router. I was asked in one of the interviews about this and so felt like reading if I am missing something out as an AngularJs ...
3
votes
1answer
31 views

AngularJs routeProvider error

I am facing problem with routeProvider, don't know why its not working. The problem is with the config function .Here's the code var mainApp = angular.module('mainApp', []); mainApp.config(['$...
0
votes
3answers
105 views

Angular ui-router shows old stale data after transition back to state

We have an ASP.NET MVC 5 application which uses ui-router AngularJS module. When we go back to a state that has already been loaded, it always shows the old data until we do a full page refresh. For ...
5
votes
1answer
116 views

ios address bar triggered when angular ui router state changes

I am using Angular UI Router. Whenever I click on a link with ui-sref the address bar from ios mobile browser shows up. For example when I scroll down, the address bar hides and if I click on a link ...
0
votes
0answers
20 views

Route in uib-accordion post back to server

I am using MVC5 with Angularjs 1.5.5 and Angular.UI.Boostrap 1.3.3. I have a anchor tag inside a uib-accordion-heading. This link is defined on the Angular routing side. First problem I encounter ...
0
votes
1answer
70 views

ng-view not rendering in cshtml

I have an inquiry about the failure of ng-view to render a partial view in a cshtml page in a hybrid angularjs and asp.net mvc application. I have seen this work before, but cannot locate the cause of ...
0
votes
0answers
13 views

how to load remote angular2 application from different domain

I have application on Angular2. I want it will can work with other remote applications on Angular2, like with modules. Name of remote application define by routing. But, how can I do it perfectly? ...
0
votes
0answers
85 views

Unable to load / route to HTML page using router-outlet

I'm trying to route to a login page in my main page Main Page is : KMS.html which goes like this (skipping scripts and all ) <html> <body class="hold-transition skin-blue sidebar-mini"> ...
0
votes
1answer
35 views

How to get full url along with # symbol in php

I am using AngularJS routing with php, so that my urls look like http://localhost/admin/home#/categories When ever I am trying to get url it wont gave full url. It gives only /admin/home. I am ...
0
votes
0answers
21 views

session data check in routing in AngularJS

I have a data stored in Session["Conditions"] = false in C# MVC in view I want to open a pop up window if the Session["Conditions"] == false I have written that condition check window.onload but it ...
0
votes
1answer
26 views

AngularJs- UI-router parent layout by child layout

I am using angular js for creating spa(single page application) app.But i am facing issue while updating base layout by child layout. Here is my app structure :: Anyone help me to design my app. ...
2
votes
3answers
79 views

How to do $state.go() with params?

I have perfectly initialized $stateProvider and I'm using all this states with ui-sref. Works great. User presses the button and thorugh the $stateProvider goes to the edit page. On this page I ...
0
votes
0answers
46 views

Angular Js - Routing Issue with different old version

I am new to AngularJS and was looking at the "Miguel Castro–AngularJS for ASP.NET MVC Developers" sample downloaded from "http://www.melvicorp.com/downloads.html". When running the code sample of ...
0
votes
1answer
64 views

Angularjs routing

I am learning Angularjs and having problem with routing. I write up a very simple slim demo example which uses out of the box MVC5. The home page display fine but when I click on the About link it ...
1
vote
1answer
222 views

Angular : pass parameter to controller from $routeProvider.when

I perform a routing upon a broadcast and I need to pass a parameter from $rootScope.$on to a controller through routing. $rootScope.$on('unauthorized_access', function (event, args) { $location....
3
votes
3answers
214 views

How to handle page refresh in AngularJS using ui.router with ASP.NET MVC

We are creating a single-page ASP.NET MVC application which uses AngularJS ui.router for client-side routing. Currently, the back/forward buttons work as expected, but when the user clicks the ...
2
votes
1answer
71 views

How to use AngularJS UI Router?

I'm trying to use AngularJS UI Router to load view1 and view2, but they're being not loading into the index.html page. Can you please help? This is the link to whole project in Plunker Also below, ...
0
votes
2answers
26 views

Angularjs template fails to work

I am working on an app about routing, my code: //HTML, I passed a 'test' into routing <a href="#details/test">Test</a> <div data-ng-view=""></div> //Template <h1>{{res}}...
1
vote
1answer
292 views

Angular 2 RC1 component routing doesn't load anything

I am using Angular 2.0.0-rc.1. I have tried to setup routing with a single route to start with, but nothing is being displayed. No errors are being thrown. Main.ts import { bootstrap } from '@...
0
votes
1answer
48 views

Child Routes Complaining About Missing Route Config

I'm trying to do a master / detail type view in my Angular2 application. In my main app component, I have the following routes defined: @Routes([ { path: '/', component: HomeComponent }, { ...