The built-in routing object in AngularJS, which can map the browser URL to a defined route.
1
vote
1answer
15 views
Calling controller from function and passing it a URL-encoded parameter
I am developing a CRUD interface for a Rest service. Currently, I could manage to get the list of teams in the system.
What I like to do is to show details for the when I click the show link. ...
0
votes
0answers
15 views
Angularjs routing for multiple Asp.Net MVC controllers with POST form request
I have 3 Asp.Net MVC controllers and all have one Index view. I am trying to do angularjs routing for the actions. Assuming the urls are like
http://localhost/Budget/Index (default controller)
...
0
votes
2answers
21 views
Ionic Framework Routing Issues
I am creating an App in ionic but I am stuck in routing issues. Currently I have an app view with a side menu and on Home page I have two tabs Tab 1 and Tab 2 which have different UI Views tab1.html ...
0
votes
1answer
36 views
Angularjs route not calling the corresponding route's controller/view
I have an Angulrjs application and in the app.js I have the following config like below:
.config(function ($routeProvider, $locationProvider, $httpProvider) {
$routeProvider
...
1
vote
1answer
27 views
Angular UI Router ui-sref nesting
Currently building an online shop in angular. Structure is as follows
Store page - Category - Product
.state('shop', {
url: '/shop'
.state('shop.category', {
url: '/:slug'
...
0
votes
1answer
39 views
angularjs state.go not working
I'm trying to load a form on success of a delete request as follows
$scope.delete = function (id) {
if (confirm("Are you sure you want to delete this record?")) {
var url = ...
1
vote
2answers
22 views
$resolve not added to $scope until after controller creation
I'm trying to take advantage of the (new in 1.5.0) feature that adds the resolve map to the scope of the route. However, it seems like the map isn't actually getting added to the scope until after ...
0
votes
1answer
20 views
angularjs: getting route resolved data outside template
On loading '/', I am getting 'content' and 'sidebar'using 'myService' and resolve option in route provider and I can render the 'content' to the template ($scope.contents = content;).
But ...
0
votes
0answers
14 views
Error: Could not resolve 'project.projectview.details' from state 'project' when accessing state of child module
I have a parent module called 'projects' and a child module called 'projects.projectview'.
projects module
(function () {
'use strict';
angular
.module('projects')
.config(configs);
...
0
votes
2answers
22 views
How to navigate through views without changing the url?
Using angular 1.5, I'm developing some features and views, where I pretend to perform some navigation, keeping the url untouchable
example:
1) Access to url myapp.com, shows login form
2) login ...
0
votes
2answers
60 views
Unknown provider error - AngularJS App issue
var myApp = angular.module("MyApp", ['ngRoute']);
myApp.config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/', {
templateUrl: 'partials/cart.php',
...
0
votes
0answers
20 views
AngularJS splitting routes results in module is not available
I'm using AngularJS 1.3 on a large single page app and I'm trying to split up my routes file.
I'm following the advice from the following question and have run into problems finding my new module
How ...
5
votes
2answers
2k views
Blank page using multiple views with UI-Router
I followed this article and this other I've tried to replicate what's on the wiki, without any luck.
So far this is what I've done
the folder structure:
partial
index
index.html // inner view
...
10
votes
2answers
836 views
IE favicon disappeared when navigating other page in angular application
I found an issue with angular application.
I have a the location provider setup to use the html5Mode true:
$locationProvider.html5Mode(true);
I noticed that the favicon is disappearing when ...
0
votes
2answers
31 views
How to include my angular controller into my ui-router model
I am a newbie in angular. I want to include my controller lib/AppController.js into my ui-router module to display on the index page. Kindly help
here is my
index.html
<body>
<div ...
0
votes
1answer
22 views
Angularjs routeprovider.when for set of conditions and one controller
I have 3 urls(blog, help, tips) for routing which will be having same controller and same html page.
rcapp.config(function($routeProvider) {
$routeProvider
.when('/csv-validation',{
...
0
votes
3answers
31 views
How does Angularjs routing work for applications outside the browser?
I am creating a single page app (mobile/desktop) using AngularJS. Based on the limited knowledge I have of AngularJS, I think the routing for the apps/websites is based on urls and ...
3
votes
2answers
2k views
AngularJS: how to preventDefault() of an event after promise completes?
I have some code like this:
$scope.$on("$locationChangeStart", function(event, newPath, oldPath) {
// Do some sync checks
if (!$scope.isPageAllowed($location.path()))
{
// ...
0
votes
1answer
24 views
bootstrap component tabs, carousels etc not respond
Until my contact page was a static HTML ie contact.html the bootstrap component tab, carousel etc work fine
as soon as I used ngRoute, routing to a partial view these components functionality no ...
0
votes
0answers
5 views
Design - nav that sending data
Iam building my first angular app and I have a design question that I'm racking my brain couple of days.
I got a nav and lists in the nav. Every li is sending data to a function in a controller that ...
1
vote
1answer
15 views
How can I construct an AngularJS state parameter in the view by concatenation?
Using the AngularJD ui-router, I have defined a state myState that takes 3 parameters: stateParam1, stateParam2 and stateParam3.
In my view the variables var1 and var2 are already defined. I pass ...
0
votes
1answer
51 views
angularjs and brackets live preview: The simplest code doesn't work
I'm a newbie to angularJS and I'm trying to make the simple thing to work but I fail.
HTML:
<!DOCTYPE html>
<html>
<head>
<script ...
163
votes
5answers
178k views
Angular JS: How/when to use ng-click to call a route?
Suppose you are using routes:
// bootstrap
myApp.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {
$routeProvider.when('/home', {
templateUrl: ...
509
votes
10answers
112k views
AngularJS : Difference between angular-route and angular-ui-router
I am new to AngularJS. I find Angular quite interesting and planning to use angular in my big apps. So I am in the process to find out the right modules to use.
What is the difference between ngRoute ...
1
vote
2answers
26 views
Angular route provider not working
I have MVC application with angular. Iam using route provider that is working fine on debug mode but when Im setting my app on iis it's not working, the site url should be: ...
2
votes
1answer
240 views
How to keep query string parameters in URL when accessing a route of an Angular 2 app?
I have an Angular 2 test app running the latest alpha (37). There are just three routes, that look like this:
@RouteConfig([
{ path: '/', component: Home, as: 'home' },
{ path: '/errors', ...
66
votes
8answers
40k views
Angular - ui-router get previous state
Is there a way to get the previous state of the current state?
For example I would like to know what the previous state was before current state B (where previous state would have been state A).
I ...
46
votes
2answers
17k views
What is the difference between $routeProvider and $stateProvider in AngularJs
Please explain the difference between $routeProvider and $stateProvider in AngularJs.
Which is best practice.
33
votes
5answers
21k views
Is there a way to preload templates when using AngularJS routing?
After the Angular app is loaded I need some of the templates to be available offline.
Something like this would be ideal:
$routeProvider
.when('/p1', {
controller: controller1,
...
3
votes
1answer
44 views
Angularjs Client-Side Routing with ui-router
I use ui-router (states) for my routing:
$urlRouterProvider.otherwise('/Home');
$stateProvider
.state('home', {
url: '/Home',
templateUrl: '/Home/Home',
controller: ...
6
votes
1answer
3k views
File download links with angulars UI-Router
I'm trying to create a simple link in my angularJS app to files that have been uploaded. I have no problem producing the link, as this is pretty trivial. The issue I have however, is that the routing ...
1
vote
1answer
65 views
AngularJS routing doesn't work
I can't implement angularJS routing in my page, when I first made it, it worked, but after browser returns nothing.
Code:
http://plnkr.co/edit/lIXeC0X6SkzXKcr8hoAp?p=catalogue
app:
...
0
votes
0answers
36 views
AngularJS: Routing runs controller twice
I'm trying to build custom radio buttons, and I've discovered that my controllers are being executed twice for each instance. I have not specified the view controller twice. That seems to be the ...
1
vote
1answer
588 views
Angular $routeProvider and Controller As Syntax
Can anyone tell me if it is valid to use $routeProvider with Controller as syntax? I am having issues accessing <h1>{{kickController.foo}}</h1> from the controller where this.foo resides.
...
0
votes
1answer
37 views
Angular routing based on a condition
I have been trying to find a way to implement angular routing which routes based on a condition rather than which link the user clicks
route1 -> view1
route2 -> view2
To add complication, the ...
0
votes
2answers
32 views
Getting a # in URL from angularJS $stateProvider
I am getting a strange # in the middle of my url for example if I try to go to localhost:8080 where I have my AngularJS app running I am redirected to http://localhost:8080/#/home. I don't understand ...
19
votes
4answers
946 views
How to persist optional state parameter on browser back in ui-router?
I'm having one parent state that has two children's state inside that I'm going to show one state based on the URL.
Out of those two states one is having to parameters like param1 and param2, I have ...
0
votes
0answers
14 views
Asp.Net Routing not working with AngularJS Routing
I have many Asp.Net MVC Controllers like User , Home , etc . I am applying AngularJS Routing only to User Controller but problem is that it is applying on whole project .For Example Here is my User ...
0
votes
2answers
27 views
Display different template on selecting an option in menu
I'm trying to display different templates on selecting the menu options. I'm able to display it, but I want the menu to be displayed along with respective template selected in menu list (i.e., I want ...
3
votes
2answers
2k views
How to use native anchor links with angularjs
I'm using angularjs on a rather large flat documentation page. The page has some navigation thats designed to use traditional url hash links. The urls look like so:
...
0
votes
0answers
24 views
AngularJS and TypeScript - defining a service to be used in a controller
I can't make this thing to work, it is super stressing and confusing.
I want to define an Angular service and use it in an Angular controller. The service knows if the user is logged in and the ...
0
votes
1answer
45 views
Angular otherwise doesn't work in case of <a href>
I have the following in one of my templates (under a folder name "partials")
<a href="index.html">« Back to search</a>
in one of my js I define the routing in the following ...
1
vote
0answers
81 views
Implementing Dynamic Routing in Angular2 (Typescript)
RouteConfig class which can be used to decorate a component (@RouteConfig) with routing capabilities has certain route definitions defined for that component. Now, the catch is to have these route ...
0
votes
2answers
535 views
view model(scope) not binding to the view(html) when routing using angularjs ngRoute
Here is my Index.cshtml, and I have 3 controllers. The MainController, View1Controller and View2Controller.
<!DOCTYPE html>
<html>
<head>
<script ...
0
votes
2answers
44 views
NgRoute not working
For some reason im not sure about my ngRoute here is not working properly. Please help me thankyou. Here is my cloud9 file where you can see live preiview and edit code. And here is my script.js:
var ...
0
votes
0answers
183 views
$routeProvider is not working on my App
Hi guys I want to ask you if u can help me resolve this, my code is hosted and when I access to the page that should be to the index.html my $routeProvider is not working
todoListApp.config(function ...
8
votes
2answers
3k views
AngularJS and PhoneGap: $location.path causes subsequent tempateUrl lookup to fail
I'm having trouble getting path lookup to work with a AngularJS v1.2.0 and PhoneGap/Cordova Android application. I've come pretty far with html5mode(true) by setting <base href="."/> in ...
0
votes
1answer
29 views
AngularJS website with user logins
I want to make a website where people can register and log in, but if I'm right. Everytime the user refeshes the page he will be logged out? How do I prevent that?
For example:
User logged in ➞ ...
1
vote
1answer
85 views
angularjs with fullpage.js anchor and routing(complex)
I try to combine angularjs with fullpage.js on the index.page. Also, there are still some pages just rendered normally by route.
Here is my route in app.js
app.config(['$routeProvider', ...
1
vote
3answers
28 views
AngularJS - Angular Routing App
I have a Angular Application, in a main.js file i have defined the app routing but i have a doubt, for example, i have a accodion menu of bootstrap, when i click about the next button:
<a ...