The built-in routing module in AngularJS, which can map the browser URL to a defined route.
1
vote
1answer
32 views
AngularJS 1 Delay route until model is loaded
I have just started learning AngularJS and am building a website to develop my skills.
I'm trying to delay angular from routing to a new page until the JSON data is loaded.
I cant find an answer on ...
0
votes
2answers
33 views
Routes When Importing Not Working
I am currently attempting to add routing to my Angular 2 project. All of the components work, but when I add 'appRoutes' to my imports on app.module.ts , an error gets thrown saying
Uncaught ...
0
votes
1answer
17 views
Angularjs routing cannot get '/webpage'
Let me start off by saying my apologies for the formatting. I'm posting from a mobile phone.
In my /public/js/app.js I have this
var app = angular.module("myApp", ["ngRoute"]);
app.config(function(...
0
votes
0answers
15 views
How to switch views in routing? Can we call a directive in templateUrl of routeProvider?
I want to switch a view based on a flag (flag will be set at the time of user login in cookies) while routing.
Something like that:
$routeProvider.when("/editTest/:ID",
{ ...
0
votes
0answers
22 views
rootScope work incorectly (AngularJS)
The main problem is, when I open page paymentManagement, rootScope get undifined. When I open page
incomeProfile.html manually and back to previos page rootScope get a data and evrything is good. How ...
0
votes
0answers
31 views
Angular list rendering
I've recently started to use Angular for front-end development to communicate with an API to perform state changes in the UI. I would like to know what is the way to update a front-end component after ...
1
vote
4answers
42 views
Angular simple single page app - Unknown provider: $routeProvider
I'm sure this is really simple and I'll get down voted but any help would be greatly apprecicated.
I have a plunker here
https://plnkr.co/edit/5tDXBPt4Ff3mM4ac5hWK?p=preview
I'm setting up a simple ...
0
votes
1answer
40 views
Angular routes for following links?
I have link as mention below and i want to write Angular route condition for that.
Link :
1.www.example.com/level-1
2.www.example.com/level-1/level-2
3.www.example.com/level-1/level-2/level-3
Like ...
2
votes
1answer
42 views
$stateParams empty ui router
I have a state as such:
.state('home.deletemsg', {
views: {
"contentworker@": {
url: '/delete/:entityname/:id/:redirectstate',
templateUrl: "Scripts/proteanapp/templates/delete.html",
...
1
vote
1answer
29 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
23 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
56 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
37 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
257 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
50 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
38 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
51 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
57 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
53 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
39 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
40 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
25 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
13 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
43 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
139 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
1answer
152 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
145 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
27 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
63 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
100 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
27 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
70 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
149 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
47 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
224 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
42 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
49 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
66 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
472 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
35 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
158 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
34 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
45 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]....
1
vote
0answers
85 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
72 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
47 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
71 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>...