The built-in routing object in AngularJS, which can map the browser URL to a defined route.
0
votes
2answers
16 views
Dynamic dependency injection in Angular ui-router resolve
Is there any way to make dependency injection inside ui-router resolve function?
I trying to achieve something like this:
resolve : {
anArray : function(/* no dependencies yet */) {
var ...
0
votes
1answer
18 views
Routing issue root of parent
I have the following setup of my app:
@RouteConfig([
{path: '/', redirectTo: ['Login']},
{path: '/login', name: 'Login', component: LoginComponent},
{path: '/dashboard', name: ...
0
votes
0answers
39 views
Share data between pages with the same controller automatically - Angular JS
I am working with Ionic framework.
I've got two templates both of which use the same "ListController" controller:
1) A list of products.
2) A detailed view of a specific product.
Both templates ...
0
votes
2answers
45 views
Need to click 2 times to apply a class in angular
I have list menu items, and I want to add a class on click and remove the same class for other element. How ever clicking for the first time does not effect. But clicking again on the same item will ...
0
votes
0answers
12 views
Integration of Angularjs route into Zend framework
Below is my angularjs route code:
'use strict';
/* App Module */
var sApp = angular.module('sApp', [
'ngRoute',
'sAppControllers',
'sAppServices','swipeLi'
]);
sApp.config(['$routeProvider',
...
0
votes
1answer
20 views
AngularJS ui-routing project - from https://angular-ui.github.io/ui-router/#resources
I'm trying to make a sample app using AngularJS ui-routing.
I'm using a tutorial from here: https://angular-ui.github.io/ui-router/#resources
I'm getting errors in the console when I run the site ...
0
votes
1answer
38 views
angularjs how to route 2 seperate controllers on 2 seperate pages for same module
I have a main page which has a module, the routing, a factory, and a controller. Below is the first page and after that I've pasted in the second page.
var myApp = angular.module('myApp', ...
0
votes
1answer
27 views
Bootstrap tabs aren't working with AngularJS routes. 'data-target' isn't working too
I got this code from the Bootswatch website, it supposed to work just fine :
<ul class="nav nav-tabs">
<li class="active"><a href="#home" data-toggle="tab" ...
2
votes
2answers
51 views
How to inject $httpParamSerializer for use in templateUrl
I am trying to inject $httpParamSerializer for use in templateUrl but I am having some issues. There isn't any good documentation and examples of how to use $httpParamSerializer.
Example code:
...
0
votes
2answers
30 views
Sending routeparams with the URL on form submit
I need to send route params with the URL when the user clicks on submit button.
Here is my simple form
<form action="#/chat/{{username}}">
<input type="text" placeholder="enter a ...
1
vote
1answer
23 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
23 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
32 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
40 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
36 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'
...
1
vote
2answers
26 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
23 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
20 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
26 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
65 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
24 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 ...
0
votes
1answer
67 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 = ...
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
25 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
35 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 ...
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
16 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
53 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 ...
1
vote
2answers
27 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: ...
0
votes
1answer
26 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 ...
3
votes
1answer
48 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: ...
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
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 ...
0
votes
1answer
38 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
0answers
39 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 ...
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 ...
0
votes
0answers
25 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
49 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
104 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
47 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
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
94 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
29 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 ...
0
votes
1answer
29 views
UI routing not working, angular JS
I'm trying to display main.html template via UI routing, but its not working for some reason. Can someone please point out the mistake in my code. Thank you.
appModule
"use strict";
...
1
vote
2answers
47 views
Strange Failed to load template with AngularJS app
I'm trying something very basic where i have folder structure something like
This is my HTML file:
<!doctype html>
<html lang="en" ng-app="phonecatApp">
<head>
<meta ...
1
vote
0answers
94 views
iis 404 error when removing hash tag from url angularjs app
I'm developing a single page app using angularJS(client) and mvc web api (server). I have two physical page first Login.html and second Index.html
when user successfully log in redirects to ...
0
votes
3answers
58 views
some angular material content does not show using angular-route
I'm new to angular js and angular material. i am working on web form app consist of 4 steps(view) i am using $route provider to switch between views however in first step only show content outside ...
0
votes
1answer
37 views
Weird flow of simple mean stack application
Here is my implementation of simple mean stack application
server.js
var express = require('express');
var app = express();
var mongojs = require('mongojs');
var db = mongojs('contactlistDB', ...
1
vote
2answers
29 views
Pass object through ui-router to controller
I'm creating a user profile page using angular/rails. I've set up a StateProvider using ui-router, like so,
$stateProvider
.state('friendprofile', {
url: '/{name}',
views: {
...