The built-in routing object in AngularJS, which can map the browser URL to a defined route.
1
vote
2answers
14 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: {
...
0
votes
1answer
32 views
How to use AngularJS UI-router capture this URL with an optional parameter?
I'm using AngularJD ui-router to capture my URL and send two parameters from that URL to my controller. Here are my requirements:
The first parameter is a mandatory integer (id)
The second parameter ...
447
votes
10answers
100k 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 ...
0
votes
1answer
29 views
Angular MVC Routing with Custom Controller
I have an Angular MVC app that has couple of controllers. Default and another custom controller that I added.
http://example.com/home/
http://example.com/ManageSummaryInfo/
All my business logic ...
5
votes
5answers
4k views
AngularJS and Laravel 4 routing conflict in HTML5 mode
I would like to remove the # hash from URLs using Angularjs' $locationProvider.html5Mode(true).
Example: The address bar displays http://localhost/shop instead of http://localhost/#/shop.
...
0
votes
3answers
29 views
ngRoute not working in Angular?
Here's the main index:
I have two .php files which needs to be viewed in template.(ng-view)
mainFrame.php
<!DOCTYPE html>
<html lang="en-US" ng-app="app">
<head>
...
-2
votes
0answers
22 views
Yet Another Undefined ngParams
I would like assistance in determining why $ngParams is undefined in my angularjs controller. The goal is to use the parameter as a value for retrieving details about the entity.
a url is constructed ...
0
votes
1answer
16 views
Callback url in angularjs with parameters for forgotpassword
Tried scouring the internet to find the solution but had no luck for a couple of days now. I am trying to implement a forgot password feature with web api but am getting stuck with the call back after ...
0
votes
1answer
6k views
AngularJS ng-template Directive Not Found in routeProvider
I am attempting to include multiple partial templates to be included in an ng-view, but the routeProvider directives are always trying to fetch the file from the server (not the embedded ng-template).
...
1
vote
1answer
22 views
Can we use angular without routing in MVC5
Can we use angular in asp.net mvc without using its $routeprovider, as in i want to use angular in few pages without having to register the routes is it possible to have so.
In short can we use ...
1
vote
1answer
1k views
Angular 1.4.5 : Uncaught Error: [$injector:modulerr] ngRoute
When I try to refresh the page I have this error :
angular.js:38 http://errors.angularjs.org/1.4.5/$injector/modulerr?
...
1
vote
1answer
199 views
Angularjs ui-router in html5 enabled mode not working
Angularjs version 1.3.14, ui-router version 0.2.15, html5mode enabled. When I try http://localhost/firsttime it redirects to http://localhost as fallback
Here is app.js
'use strict';
// Declare ...
0
votes
1answer
36 views
ui router - Passing data from controller to another view
Without injecting services how to pass data from one view's controller to another view. I refered data,params, resolve, parent-child concepts but I am not able to figured it out.
Here is the ...
1
vote
3answers
36 views
Access ID of view in Angular JS
How can I access the customerId of a customer in the controller once the view got loaded?
app.js:
$stateProvider.state('app.customer', {
url: '/customer/:customerId',
views: {
...
2
votes
2answers
84 views
How to do load page in Angular JS?
How to load content on page by clicking on menu links?
For example, there is menu:
<a href="#">Personal</a>
<a href="#">Contacts</a>
Question is in how change template HTML ...
0
votes
2answers
39 views
Angular js directive in module not working correctly
I have one module call "menuLeft", when module he initiate ,not loading correctly my directive, but if run my function en el method "run" correctly.
I dont know why is this.
This is my code
...
1
vote
1answer
16 views
AngularJS $state.go pass always empty valure for parameter
I've tried to pass one parameter white $stete.go.
ROUTER
$stateProvider.state('login.signin', {
url: '/signin',
params: {
login_event: ''
},
templateUrl: ...
1
vote
1answer
30 views
I don't believe Angular UIrouter is routing to my view
Not changing to the correct template via ui-view when I click on the button in my footer to route to that view. Console is not spitting out any errors, so I am baffled.
Here are my states
...
0
votes
0answers
23 views
AngularJS use html5mode with hashbang mode
I would like to use relative url (href="search/") with hashbang mode in Angularjs. So I used this part of code:
$provide.decorator('$sniffer', function($delegate) {
$delegate.history = ...
0
votes
2answers
42 views
Change AngularJS urls with ng-model
Is there any way to change AngularJS urls with ng-model?
var scotchApp = angular.module('scotchApp', ['ngRoute']);
scotchApp.controller('mainController', function($scope) {
...
3
votes
3answers
70 views
Removing the # from AngularJS Routing
I checked Single Page Apps with AngularJS Routing and Templating tutorial
and found Pretty URLs in AngularJS: Removing the # tutorial for remove # tag from URL. I did all the things but I can't get ...
2
votes
1answer
46 views
Angular routing in Spring Boot web application
I'm developing some project using angular and spring boot and I have some confussing situation:
I have Spring Controller to share view file names with my application
@Controller
public class ...
0
votes
3answers
57 views
Why angular routes are not working in ASP.NET MVC
I am new with angularjs, and implementing it in ASP.NET MVC. I read few articles and implement code like below,
this is my layout page,
@{
Layout = null;
}
<!DOCTYPE html>
<html>
...
0
votes
1answer
68 views
AngularJS .run() causing initial views to not load
I have the following setup in my main angular.js file
var application = angular.module('application', [...]).config([..., function(...) {
//Setup routes
$routeProvider...
}]).
...
2
votes
2answers
51 views
How lazy load js scripts synchronously? [closed]
I'm trying to find a tool or a .js lib to lazy load my scripts on demand of the routes/urls'.
Basically, I want to:
state = {
state: 'widgets',
config: {
url: '/',
templateUrl: ...
0
votes
3answers
53 views
AngularJS routing not working, but no errors are thrown
I'm following this video tutorial and messed something up in the haste.. The problem is that I got rid of all the errors I made, but it still doesn't work as expected. The search form box doesn't ...
2
votes
2answers
25 views
AngularJS ui-router unable to load templateUrl
I have this kind of project structure:
index.html
<html>
<head></head>
<body ng-app="myApp">
<div ui-view=""></div>
</body>
</html>
...
2
votes
3answers
916 views
Controller being called twice in Ionic (AngularJS)
In my angular project the user accepts a EULA then get automatically redirected to their dashboard, however, on this redirect the DashboardController seems to be being called twice, the ...
-1
votes
0answers
27 views
How to check the logic in $urlRouterProvider to redirect the url?
I have two kinds of users(public and authenticated), i need to setup the url according to the user.
When public user access the url as empty need to redirect to '/p'
$urlRouterProvider.when('', ...
1
vote
1answer
28 views
anchor href linking with angular routes
I use angular routing between multiple views and try to populate a common breadcrumb list on each route change. This works fine except that the hyperlinks in the breadcrumb don't work.
Essentially I ...
0
votes
2answers
182 views
Routing - Ng -hide , Ng-show AngularJS
I have a base HTML file dashboard. In dashboard I have included a header HTML file with a menu. .A content tml file. A footer HTML file using ng-include.
Now I want to click on the menu on the header ...
3
votes
2answers
38 views
How do i define routing to navigate to details page when link clicked
I need some help to implement list and details page.
I have motorList.html page where i am listing all motors as hyperlink retrieved from server (database).
motorList.html
<div>
<ul ...
1
vote
1answer
22 views
different template url on basis of role angular
I have route configuration like :
.config(['$routeProvider',
function ($routeProvider) {
$routeProvider
.when('/home', {
...
0
votes
2answers
825 views
Module 'ngRoute' is not available
I have linked the script in my index.html, and referenced it in app.js, but I keep getting the error that ngRoute is not available. Any help would be greatly appreciated!
app.js
...
0
votes
1answer
31 views
passing the path params with object in angularjs
I have a partial from which I need to call a route which will have a controller and a view of its own. When I call the route, I also need to pass a json object to the controller. I have done this ...
4
votes
2answers
32 views
Controller gets initiated twice
I have a simple controller (logincontroller) which gets initiated twice when loading login.html, however I do not know why that happens.
MyApp.js:
angular.module('PVM', [
'Authentication',
...
1
vote
1answer
11 views
on create/update, using $state.go('main.myEntries') but until reload the updated or new content doesn't show
I have a page where user can create or update entries. Then, when user hits 'Submit' the create or update is done and user is sent to the My Entries page.
However, until I reload the page, I am ...
0
votes
0answers
20 views
Integrate Rails served template using AngularJS
I need to render an AngularJS view that formats and shows the data a rails json api returns. Have seen similar issues in stackoverflow, but the solutions didn't help.
rails - routes
resources ...
1
vote
1answer
204 views
urls and angularjs with mvc
I have a problem with my angular routes when entering the URL directly in the URL bar of the browser.
What happens is this. When my app loads up I call a single MVC controller which loads a MVC view ...
13
votes
3answers
3k views
How to avoid $compile:tpload errors on 401 status code response
We are developing a Single Page Application with AngularJS and ASP.NET MVC Json Rest API.
When an unauthenticated client tries to navigate to a private route (Ex: /Foo/Home/Template) to get a ...
1
vote
1answer
31 views
Angular JS $state conditional from controller is not working
I have a wizard in AJS and it has around 10 views. Based on user selection and other parameter my controller decide next view and set $state.go('new view'). But the code seems to be not working.. not ...
19
votes
3answers
19k views
How to use ASP.NET MVC and AngularJS routing?
I’m working on a new ASP.NET MVC and AngularJS application that is intended to be a collection of SPAs. I’m using the MVC areas concept to separate each individual SPA, and then I’m using AngularJS ...
0
votes
1answer
132 views
CakePhp Routing Interfering with AngularJS Routes
Okay so the problem I am having deals with using CakePhp (v3) and AngularJS. I want to use CakePhp purely to host my JSON webservices. I have this working and the routes prefixed with API. The ...
-2
votes
1answer
23 views
populating an array using a form and displaying the array in separate views angularjs
I am in the process of learning AngularJS and Ionic to create an app for a semester project, but I am having trouble finding a resource to show me how to solve my problem, so I am calling all NG and ...
0
votes
1answer
19 views
angular $routeprovider endless optional param
I'm trying to create file & folder manager using angular-js.
So i need endless optional parameters for folderIds to handling this:
example.com/drive/1/2/3/4/5/...
Do we have something like ...
1
vote
2answers
1k views
Microsoft JScript runtime error: [$injector:modulerr] in AngularJS v1.3.0-beta.11
I encountered error of
Microsoft JScript runtime error: [$injector:modulerr] ...
0
votes
1answer
24 views
Dynamically change state url page number for pagination in angualrjs
how to change/add the state and url for pagination
example
.state('result.({pageNumber:[0-9]{1,4}})', {
url: '/{pageNumber:[0-9]{1,4}}',
templateUrl: 'tpl/search_result.html'
...
1
vote
1answer
38 views
How to work with index.html, ui.router, and redirect back to home
I use for testing python simpleserver to test my angular app. I new to ui.router and trying to get index.html work properly and when trying to go home using e.g.
<a class="navbar-brand" ...
1
vote
1answer
19 views
Angular not found until after it's needed?
We're trying to get Angular set up for a fairly simple project using Gulp, but we're somehow failing at the first hurdle. Here's what we have set up, more or less:
index.html:
<!doctype html>
...
0
votes
0answers
93 views
AngularJS $routeChangeError not being called or executed
I have some API calls to make in my router before my controller loads and my view renders. Here's what I'm trying:
app.js:
.when('/settings', {
templateUrl: 'views/settings.html',
...