The built-in routing module in AngularJS, which can map the browser URL to a defined route.
1
vote
0answers
5 views
angular template cache doesn't work when template key contains file extension
Template cache fails for me for some reason, when I do this:
angular.module('myApp').run([
'$templateCache', function ($templateCache) {
$templateCache.put('test.html', 'content');
}
]...
0
votes
0answers
21 views
Routing issues in rendering AngularJS components from Angular2 routes
I have a Hybrid(Angular1 and Angular2) repo which having mix of Angular1 and Angular2 routers. Followed the sample from https://vsavkin.com/migrating-angular-1-applications-to-angular-2-in-5-simple-...
0
votes
1answer
15 views
Injecting $location service makes my url with fragment identifier weird
Here is my angular code
var app = angular.module('app', []);
app.controller('mainController', ['$location', '$scope', '$log', function(location, scope, log) {
log.info(location.path());
}]);
And ...
0
votes
2answers
42 views
Inline angular template
I've been trying to make a small website that has a main page where a part is changed using templates. I've made an HTML file that contains a small menu for choosing what to show and two templates. If ...
0
votes
3answers
70 views
AngularJS routes returns 404 error when page is being refresh
I am new to angularJS and I love coding with it. I am currently building now a web-portal using angularJS, and each of my pages uses ngRoute. It works fine for me but when I tried to refresh the page ...
0
votes
1answer
24 views
MVC routing vs angularjs routing
While MVC itself has routing feature why should we use angularjs routing? I am expecting an answer apart from just addressing server side and client side issues
2
votes
2answers
42 views
Route change events while trying to avoid using $rootScope
As the Angular team (and severals blogs) adviced, I try to avoid using $rootScope as possible in my apps.
$rootScope exists, but it can be used for evil
"Of course, global state sucks and you ...
1
vote
1answer
18 views
ng:btstrpd err App Already Bootstrapped with this Element?
It's entirely possible I'm doing something stupid ...
Full stack trace of the Error
Error: [ng:btstrpd] App Already Bootstrapped with this Element < html class="js flexbox flexboxlegacy canvas ...
1
vote
1answer
35 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
34 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
20 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
17 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
38 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
43 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
41 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
53 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
38 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
24 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
73 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
309 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
62 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
40 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
57 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
62 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
57 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
27 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
14 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
44 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
173 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
180 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
177 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
29 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
65 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
101 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
73 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
164 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
254 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
43 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
57 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
77 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
618 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
36 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
199 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 ...