The ngRoute module provides routing and deeplinking services and directives for angular apps.
0
votes
1answer
28 views
AngularJs 1 routing not working
My folder structure is:
-ngTest
--Scripts(all js files)
--index.html
--main.js
--partialView.html
index.html code is as follows:
<!DOCTYPE html>
<html ng-app="myApp">
...
1
vote
1answer
61 views
angularjs 1.6 route provider not routing to route
I have ana angular app that I want to route.
app.config(["$routeProvider",
function ($routeProvider) {
$routeProvider
.when("/", {
template: "<h1>Home</h1>"
...
0
votes
1answer
19 views
AngularJS URLs all of a sudden contain hashbang
I've been developing an AngularJS app for the last month with angular v1.5.8 and angular-route v1.5.8 and node v 7.1.0 (with nvm). All of a sudden, my urls contain a hashbang and the routing isn't ...
1
vote
2answers
32 views
trouble with routing in AngularJS SPA
I am a beginner to AngularJS and trying to build my first SPA. I have created the routes for a few pages and specified the links in the nav bar. the index file is
<nav class="navbar navbar-...
0
votes
1answer
12 views
angular 2 focus element after router.navigate is not working
On certain event I need to navigate to different route and focus one of the input filed.
My Template
<qualification>
<address (updateAddress)="updateAddress($event);">
</address&...
0
votes
0answers
11 views
Route between Angular1 and Angular2
Need suggestions on routing between angular1 and angular2.
As of now, I have bootstrapped my current application using ngupgrade but need to know
1) How to route between angular1 and angular2.
2) ...
0
votes
0answers
28 views
Issue in angular state and route provider?
Here the problem goes, I am using stateprovider and routeprovider in my angular app but when I run app in production mode and try to refresh the url, the error comes up with "no input file specified". ...
1
vote
1answer
31 views
Routing issue with AngularJS project using yeoman setup
I have setup a new Angular project using yeoman. Angular version is 1.6.0. Project setup was successful but I have been facing an issue with routing
Task runner - Grunt
When I run the project in ...
1
vote
2answers
92 views
Angular2 - APP_BASE_HREF with HashLocationStrategy
I have an angular application uses routing with HashLocationStrategy, I need to set different value in main html file and different in routing.
I tried this solution:
@NgModule({
imports: [
...
0
votes
2answers
62 views
angular url is adding unwanted characters
I had a project where the URL just worked fine when working locally by going to
localhost:9000/
the URL would become
http://localhost:9000/#/
As of some change I made it now goes to
...
2
votes
2answers
377 views
Angular2 — @ViewChild from TypeScript base abstract class
I was looking @ this SO Q & A, and wondering if it was possible to have a base abstract class instead? Rather than an interface, is it possible to have differing implementations of a base class ...
2
votes
2answers
41 views
Why is $scope.$apply necessary to update this array
I am using Angular 1.5.9 and angular-route 1.5.9. I have a working solution, but it doesn't make sense to me that I would need $scope.$apply() in order to update the DOM.
I am using a factory and a ...
1
vote
1answer
29 views
Angular web app having extra ! in the url
I have a basic Angular webapp running on ec2 ubuntu 16.04, using routing($routeProvider). When I open the application home page say example.com, instead of opening http://example.com/#/ it opens http:/...
0
votes
0answers
30 views
Angular 2 - can redirect route, but using direct link doesn't work
So this is what my app-routing.module.ts looks like
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AppComponent } from './app....
0
votes
3answers
31 views
Conditional expression in $routeProvider
I have an application with a working system of authentication. My issue here is that when a user is connected, he can still access by URL to the login page. I would like to redirect all connected ...
0
votes
1answer
11 views
AngularJS Angular-Route on Ubuntu changing routes /#/ -> /#!/ links not working
Project works fine locally.
However after deploying it to an AWS Ubuntu instance, the routing does not seem to be working.
The home page of, www.lewisengelart.com/#/ loads with a bang as, www....
5
votes
3answers
109 views
AngularJS routing with templateUrl
I have a problem with the AngularJS routing: I don't get any feedback of the page. No errors or view-switches.
I checked my implementation of the module, but it's declared in the right way. Then I ...
0
votes
0answers
97 views
Angular Routing in md-nav-bar
I have my html pages stored in the wwwroot folder under the partials subfolder. I want to load these html files(which is in partials folder) and view it in index.cshtml(located in Views Folder) using ...
13
votes
6answers
20k views
How to remove the hash # from the angularjs ng-route
I am trying to use the locationProvider to remove the hashtag from the url routes in angular js but it gives me error.
app.js
var eclassApp = angular.module('eclassApp',
['ngRoute', '...
0
votes
2answers
15 views
Angularjs $routeParams causing RangeError: Maximum call stack size exceeded
I'm using AngularJS v1.5.9 and use $routeParams I get the following errors on my chrome console over and over again.
RangeError: Maximum call stack size exceeded
at la (angular.js:10097)
at p ...
1
vote
3answers
439 views
Angular 2: Can't resolve all parameters for Router
Goal
Get routing working without losing sanity.
Error
Error: Can't resolve all parameters for Router: (?, ?, ?, ?, ?, ?, ?, ?)
app.routing.ts
import { ModuleWithProviders } from '@angular/core';
...
5
votes
3answers
30k views
How to get checkbox value in angularjs?
I have a 10(or n)checkbox in my ng-view. Now I would like to ask here that
What is the most efficient or simple way to check if checkbox is checked and if checked get the value of checkbox.
<...
-2
votes
1answer
14 views
Angular2 cannot find router_providers, locationstrategy in @angular/router
I user angular2 router and got problem with directly path.
If i write localhost:3000/container
Page will not be found. I knew if i include ROUTER_PROVIDERS it will be works. But i have not ...
0
votes
0answers
21 views
Angularjs no predefined routes
I'm playing with angular trying to create some routes without specifying statically the paths
I have the following ng-routes now:
route
.when("path/of/first/file",{templateUrl: "path/of/first/file....
0
votes
1answer
25 views
Issue with using $_GET['id'] to get ID from route (Angular Site)
I have an error where it will not send the id into the page with $_GET['id'] (#/post?id=1)
I get the following error:
Notice: Undefined index: id in D:\xampp\htdocs\ls\includes\post.php on line 3
...
2
votes
1answer
29 views
Angular 2, cannot match any routes
I am trying to substitute an anchor tag with a button tag to navigate to another route. As a result, I have a function that is called on click, which looks something like this:
submitReport (...
2
votes
2answers
280 views
Auxiliary router-outlet inside primary router-outlet
I'm trying to use an auxuliary router-outlet inside the primary router-outlet.
app.routing
export const appRoutes: Routes = [
{ path: '', component: HomeComponent },
{
path: 'page',
...
0
votes
2answers
15 views
Angular route condition for url like 2010/10
How can i write $routeProvide when condition for url like www.example.com/2010/10 ??
I have written condition like
.when( '/{year:[0-9]+/{month:[0-9]+', {
templateUrl: WPAngular.partials + '...
0
votes
1answer
41 views
Angular JS controller doesn't work with routing
I’m working with Angular JS 1.3, I have problem with ngRoute, in the code below
angular redirects to "apex/" + pathTemplate + "_product" (the page works in Salesforce container) but control doesn’t ...
0
votes
2answers
74 views
Angular2 Routing in Apache Tomcat not working with redirect
I am working with Angular2 and an Apache Tomcat 8. When opening my website with the root url it works and clicking buttons redirects to the specific urls. But when manually opening a specific url or ...
1
vote
0answers
32 views
Angular 2 Testing the Router Module
I am attempting to test my Router in Angular 2.2.1 to ensure the proper routes are set up and going to the expected location. I've done Google research and have read and re-read the app.component....
0
votes
1answer
21 views
Access url in routeProvider in AngularJs 1
I am using AngularJs#1.3.8 with ngRoute injected in my main module. So, giving the current route:
.when('/users', {
templateUrl : 'template.html',
controller: '...
0
votes
0answers
50 views
Angular Routing and Query String
I don't really know how to put this issue. I don't even know if it is really an issue, please pardon me.
I have two menu link having the same url with a query string value to differentiate what ...
0
votes
1answer
26 views
angular ng-route doesn't find a template
Angular ng-route does not find a template but it is included in Dom. I am getting this error:
http://localhost/template/recipes Failed to load resource: the server responded with a status of 404 (Not ...
1
vote
1answer
100 views
Angular 2 Jasmine Can't bind to 'routerLink' since it isn't a known property of 'a'
I'm creating a unit test for my Navbar Component and I'm getting an error:
Can't bind to 'routerLink' since it isn't a known property of 'a'
Navbar Component TS
import { Component } from '@...
2
votes
2answers
62 views
angular 2 passing params in route
I have a component from where i need to pass data to another component on click of button so I have used [routerLink] property in anchor like this
<a [routerLink]="['/employeedetail' , name, ...
0
votes
1answer
60 views
Angular routing in ASP.NET MVC application, How to use ngView in Asp.Net MVC _Layout.cshtml?
My Sample application has two MVC Controllers
1.HomeController
2.DetailsController
HomeController.cs
public class HomeController : Controller
{
public ActionResult Index()
{
...
0
votes
1answer
10 views
Angular 2 - Error "Property 'iconName' does not exist on type 'StateParams'
I am using ui-router-ng2 to handle my routing in my web app. I am currently sending an string(iconName) as parameters from one view to another.
Here is my code for icon.component.ts
import { ...
1
vote
1answer
19 views
How does Angular find auxillary router-outlet tags to use
While I was expirmenting with adding auxillary routes to my application for showing popup windows and wizards, I had some trouble getting angular to actually recognize my named router-outlet tag. I ...
0
votes
0answers
15 views
Angular Routing in with localhost/WebsiteName
I have an application hosted on IIS under DefaultWebSite\MyWebsite.
The URL to access the application becomes like:
http://localhost/MyWebsite/#/
All works fine till here. Now, i am expected to ...
0
votes
0answers
24 views
Angular 2 Router Variable
Can I get the value from :demoid variable in path and place it inside loadChilren? I want to load any modules dynamically by :demoid. Is it possible?
RouterModule.forChild([
{
...
6
votes
1answer
73 views
Loading jQuery functions in Angular 2
What's the proper way for loading jQuery functions in Angular 2?
I've added my jQuery to ngAfterViewInit. It works fine for one route, but if I navigate to another one (e.g. from id: 1 to id: 2), it ...
1
vote
1answer
20 views
Angular Routing , browser URL not updating as expected
I have an angular app and i am using partial views in the app and routing using $routeProvider , the app is hosted in a server ,everything works great.
The URL to launch the app is something like ...
3
votes
3answers
85 views
Use “/” as Optional Separator for Parameters in Url - Angular-Ui-Router
I've a tricky issue that I was not able to solve in a while.
Essentially, when I'm on a certain $route and I do a certain $state.go(routeName, params);, I need to append a certain parameter or ...
0
votes
2answers
20 views
Defining routes for a angular module
I have a mainApp.js file and I put this code on it:
var mainApp = angular.module('mainApp', []);
**//ROUTES**
mainApp.config(['$routeProvider', function ($routeProvider) {
$routeProvider
....
0
votes
1answer
14 views
How to test `$routeChangeStart` every time to check the user login statsu?
In my app, I require to check the user details, in case if the user is not logged in, then i require to redirect back to /login page. but my try is not working, where should I do this config?
my try ...
14
votes
5answers
20k views
How to apply jquery after AngularJS partial template is loaded
I have a simple website that implements jQuery in order to create a Slider with some images in the Index.html top banner.
Now, I want to use AngularJS so I'm breaking the HTML code into separate ...
0
votes
0answers
90 views
Angular 2 Routing, replace initial params
I'm trying to do the following. I'm creating a component that contains a Table with User entities.
This component will be called/routed as follows from the link: http://localhost:4200/users
In turn ...
-1
votes
0answers
26 views
Angular js routing login page and app
Suppose I have a full screen login page with a beautiful background and all and after login rest of my app with routing. So should I create another login html page or adjust it in the routing and if ...
0
votes
1answer
52 views
Angular Routing not working, the URL changes but the page doesn't load correctly
Below is my file structure, please let me know what I am doing wrong that my routing is not working:
index.html
<!DOCTYPE html>
<html ng-app="appNakul">
<head>
<title> ...