The built-in routing module in AngularJS, which can map the browser URL to a defined route.
1
vote
1answer
18 views
AngularJs: Route Provider For Tab?
I am new to AngularJs. I am working in Angular Routing Concept. There are plenty of suggestion and examples are available for Routing and i am researching it. But its not fulfilling my requirement. I ...
0
votes
0answers
12 views
AngularJS with dynamic stateful views / routes
TLDR; Is there any way for me to automatically keep routes from unloading and keep state preserved?
I am trying to build a client-side application where I want to be able to keep state (data, in-...
0
votes
3answers
26 views
angularjs routing is not working no error found
what seems to be wrong here i dont get any error but at the same time no progress in routing. .
index.html
<!DOCTYPE html>
<html>
<head>
<title>My Angular App</title>
&...
0
votes
2answers
29 views
redirect after login using $location.path(lastPath); will not re-run controller constructor
I have written a redirect service interceptor in anagular:
angular.module('myApp.services')
.factory('loginRedirectInterceptor', _loginRedirectInterceptor);
function _loginRedirectInterceptor($q, $...
1
vote
0answers
75 views
Angularjs showing 500 internal server error on posting data to laravel routes
For some reason I'm getting a 500 interval server error when posting data from angular to laravel route.
app.js
var quora = angular.module("quora-app", ['q-controller-1', 'ngRoute', function($...
0
votes
0answers
34 views
AngularJS : Showing a spinner while during $http request
I put in place some routes with the $routeProvider.
The place is that some templates need some time to load because of the $http requests.
What I wanted to do is to display a spinner or a wait ...
0
votes
2answers
34 views
Angular js route not working when revisited
I am developing an Angular js application. Frankly, I am new to Angular JS. I am using angular js route to develop single page application. Below is how I configure my route.
app.config(function($...
0
votes
1answer
44 views
ngroute change master page for specific route
I want to know if its possible to change the master page which is used by ngroute for specific pages.
For example, I want to display different master page or exclude completely the master page for ...
0
votes
0answers
44 views
AngularJS component routing shows 404 on refresh or when manually entering url
I am using XAMPP Apache to run angular on localhost. When the server starts it goes into index.php, calls a component
then from inside the app, it default links to Login with the path '/login' ...
0
votes
1answer
44 views
URL Rewrite for AngularJS not working in ASP.NET
I just created an asp.net app and have views to different pages like a courses page.
I am running everything on:
localhost:50717 on IIS.
I have a routes.html page with an ng-view tag. Initially if ...
1
vote
2answers
37 views
Angular, what dependency is missing
I'm learning angular.js and have all libraries linked from CDNs.
When I try to use $locationProvider and $routeProvider I get this error:
Referee.config(["$locationProvider", "$routeProvider"],
...
0
votes
2answers
37 views
Is AngularJS Routing only used with ng-view?
As far as I understand, AngularJS routing configuration is required if you want to use ng-view for Single Page Application (SPA).
My question: if I am not building SPA, and I dont configure routing, ...
0
votes
0answers
23 views
customize url using ui-router
My folder structure is like this
index.html
app.js
view/compare.html
assets/js/angular.min.js
assets/js/angular-ui-router.min.js
i want a custom url for view/compare.html page like /compare only. ...
1
vote
0answers
12 views
Angular js 1 : stateProvider … how to configure state and its child state once parent is resolved and then child
I am working on angular js state providers...I am using parent states and its child states.
For example ..
Parent state is 'home'(url:/home) and its child state is 'home.profile'(url:/home/profile)
...
0
votes
0answers
39 views
AngularJS routing not reloading header script in the page
I have a problem with the routing of AngularJs.
My structure is this:
header.php
footer.php
main.php (require header.php and footer.php)
dashboard.php
associated.php
In the header file is the call ...
0
votes
2answers
108 views
Get params from URL using $stateParams, UI-router. Undefined Value
I am passing a value from one state to another using UI-Router. In my controller when the url is updated I am trying to get access to the second parameter of my url using $stateParams, but for some ...
1
vote
0answers
110 views
Auth0 redirecting back to call url after login angular2
After login the auth0 redirects me back to the call back url on angular2. How can i make it go to the path that i gave to the routing without redirecting to the call back url.
1
vote
2answers
88 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
15 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
58 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
97 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 ...
1
vote
1answer
26 views
Why do I get a duplication of div while using ui-router?
I wrote a simple demo to try to understand ui router.
But the problem is, I got a duplicate view while using ui router.
Here's the stateProvider part
app.config(function($stateProvider,$...
0
votes
2answers
56 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
103 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
45 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(function(...
5
votes
1answer
147 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 mainpage(...
0
votes
3answers
37 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
41 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
45 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
181 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
30 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
106 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
32 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
14 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
21 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
39 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
54 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
58 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
44 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
54 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
235 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
35 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
24 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
30 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', ...
1
vote
1answer
176 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
41 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
22 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
47 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
46 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(['$...