1,285 questions
0
votes
1
answer
50
views
html5mode does not remove hashbang mode in angularjs
I am trying to create an SPA in AngularJS using ngRoute. To do so, I have enabled HTML5 mode to remove the # from the URL. However, when I navigate to a different route (e.g., /about or /contact), the ...
0
votes
1
answer
76
views
images not loading when changing base url in angular JS project
I want to change the base url
when load the application url is http://localhost:4200/#/ I want to change this to http://localhost:4200/carrom/.
For doing this I changed base url to then loading url ...
1
vote
0
answers
29
views
Routing in AngularJS is not working for me
<script>
var app = angular.module('myApp', ['ngRoute']);
app.config(function($routeProvider){
$routeProvider.when('/dataBinding', {
template: `
<div ng-controller="...
1
vote
1
answer
62
views
Angular JS Routing is not working in ASP.NET MVC and Web API project
I have two main ASP.NET MVC controllers: Home and User. Home has an Index method that is returning an Index view which is main page for loading partial pages (User Detail, Facility, Login Page) in ng-...
0
votes
1
answer
53
views
How do you add two controllers to the same view in route angular
The part of the code I want to change is
var profile = {
name: "web.profile",
parent: "web",
url: "/profile",
title: "...
0
votes
1
answer
25
views
cannot resolve from state ' ' . What configuration did i put wrong?
I am trying to go using ui-sref but it's saying cannot resolve from ''. What did I do wrong in the route configuration. Everything seems correctly configured from my point of view. But i am getting ...
0
votes
1
answer
85
views
I use the following approach to display the page in a new tab, But when I am using target=“_blank” , my params were lost
<a ui-sref="app.reports.equipmentarg({factoryId: fid})" target="_blank">Click Me</a>
it works fine and the parameter passed if I remove the target attribute but then it opens in the ...
0
votes
1
answer
44
views
ng-view 'Maximum call stack size exceeded after' application start
I am loading a page after the login process is complete. Basically login page having one ng-view, after login success I'm trying to load an entirely new page to replace the content.
$routeProvider
....
0
votes
1
answer
89
views
Angular JS - variable returning undefined
I've got a simple to do application, you enter an item on the new item partial/view, which then adds a new entry onto the UI in the home page partial.
I have a service which allows me to share the ...
0
votes
1
answer
63
views
$routeProvider is not defined - Unable to get through this
I've been trying to get a basic project running with ng-route.
I have two views - View A and View B. They are controlled per
flipFlop.config(['$routeProvider', function ($routeProvider) {
$...
1
vote
1
answer
6k
views
How do I solve AngularJs -routing not working [duplicate]
I am writing some simple code to practice routing in angular. I have an index.html file which has links to access the respective templates and a div element to display the templates. The templates ...
0
votes
1
answer
40
views
Routing issue with angularjs while version update
Scenario : I have update my current angularjs version from AngularJS v1.5.5 to AngularJS v1.5.7. Application is working fine but there is issue with URL routing it is behaving different. Let's see ...
2
votes
1
answer
456
views
Can AngularJS routing be used for some URLs and regular GET requests used for others?
I work on an ASP.NET MVC app which originally used traditional navigation (HTTP GETs and POSTs) and no AJAX/Fetch functionality. Over time, we have brought in AngularJS to take advantage of two-way ...
0
votes
1
answer
167
views
AngularJS $routeProvider Not loading content or logging to console from controller
I am trying to make a website which does not need to refresh when going from page to page. I have achieved this before by using the angularJS $routeProvider but for some reason my content will not ...
1
vote
0
answers
320
views
Lazy load routes in Angularjs with $ocLazyLoad
I'm using Angular-ui-router for routing and oclazyload to load each controllers base on routes (lazy loading).
Problem: My route.js file is getting bigger and bigger (8000 line until now!)
I lazy load ...
0
votes
1
answer
74
views
How to react to a link loading the same URL in AngularJS?
I have a form on a page that is linked from my menu using a normal anchor tag.
Now if that menu item is clicked again when I'm already on that page, I want to check for unsaved changes and either ...
0
votes
1
answer
137
views
Angular JS multi level routing
I have an application as following structure
Index.html
which has app.js with all routing and ng-view is added inside index.html
I have another template which am loding on successive login over ...
0
votes
1
answer
110
views
AngularJs: Pass input data to another route and then get it there
I'm trying to make SPA using angularJs routeProvider:
<script>
var app = angular.module("myApp", ["ngRoute"]);
app.config(function($routeProvider) {
$...
0
votes
1
answer
350
views
HTML loading in Angularjs
I would like to ask if I am doing something wrong in my angularjs application. My HTML code is requested dynamically, but if I understand correctly single page apps should be loaded fully only once ...
0
votes
2
answers
87
views
angularjs - table isn't appearing
I have an application in AngularJS (I'm begginer..sorry!) that needs to show diferents tables when I click on the menu.
Problem: simulado1.htm is appearing when I click in the menu, but its table ...
0
votes
2
answers
161
views
Angularjs: Same state and url for edit and add page
I want to use the same state for both edit and add page.
Here is how my state looks
.state('editProduct', {
url: "/editProduct/:productId",
data: {title: "Edit product"},
templateUrl: 'views/...
1
vote
1
answer
756
views
AngularJS upgrade from 1.4 to 1.5 routes not loading
I upgraded our AngularJS package from 1.4.14 to 1.5.11. In doing so, our routes unexpectedly stopped loading. The base url for our application is baseurl.com/app.
I've reviewed the angularjs ...
0
votes
0
answers
250
views
Angular route causing an infinite loop
I have a an angular single page app that loads correctly on for the home and about pages. But the edit route goes into an infinite loop of errors.
The error is
SyntaxError: Unexpected token '<'
...
1
vote
0
answers
36
views
Angularjs multiple app can't route a subapplication
I have a site with multiple angularjs app inside. The structure is the following :
index.html
js
js_controller.js
js_directives.js
js_filters.js
js_routes.js
js_home.js
...
0
votes
0
answers
359
views
After remove # from url page refresh get error 404 in angularJS
My Index file
<base href="/"/>
In my controller added $Locatonprovider and redirect like this
$location.path('/ui-login');
$locationProvider.html5Mode(true);
.htaccess file
...
1
vote
1
answer
1k
views
Percentage "%" sign interpreted by AngularJS router
I have the following route in my AngularJS application
var accountactivation = {
name: 'accountactivation',
url: '/activate/:code',
templateUrl: 'views/account/activation.html',
...
0
votes
2
answers
99
views
Angular JS routing from local env
I was going through some tutorial on Angular JS and I can load single page and do things within single file, but when I got to the routing, it would not get to the other page.
Here's what I have in ...
0
votes
0
answers
22
views
Can AngularJS route a user to the same instance of the same view in memory?
I have an AngularJS 1.6 app. There is one particular route to a view that displays a calendar to the user.
When the user clicks on entries in the calendar, they are routed to a view with information ...
0
votes
1
answer
350
views
can not route directly using browser url what can i do?
I cannot route directly by using input in browser.
I am using $locationProvider.html5Mode(true);
so when i write the url in browser then they cannot route in angular js.
AppRouting.js
myApp.config([...
0
votes
1
answer
74
views
How can I get AngularJS go to another page onclick
I am using AngularJS routing, which is changing the template when I select a link. However, for the last page, I have a link that I want to go to another internal HTML page and not load a template ...
0
votes
1
answer
142
views
Uncaught Error: [$injector:modulerr] ngRoute in angular js
This is My Angular Code on top it is showing that angular is not defined. I have written this code to test routing concept in angular js
var app=angular.module('myApp',['ngRoute'])
.config(function ($...
0
votes
1
answer
611
views
How to fix $route.current is undefined in AngularJS
I am new to AngularJS and currently I am getting an "TypeError: $route.current is undefined". Please see code below:
var sampleApp = angular.module('sampleApp', ['ngRoute']);
sampleApp.config([...
0
votes
1
answer
272
views
Is there a way to pass `data` attribute of states in ui router?
Assume that we define state like this:
(function() {
'use strict';
angular.module('app').config(stateConfig);
function stateConfig($stateProvider) {
$stateProvider
....
4
votes
0
answers
246
views
How to handle Location bad-path & redirect to default state
I have state with multiple params. Like below
$urlRouterProvider.otherwise(function ($injector, $location) {
var $state = $injector.get('$state');
return $state.go('404');
});
$stateProvider
...
2
votes
0
answers
50
views
.htaccess doesn't redirect (version 1.6.10)
To clean my URL from the additional #!, I followed these steps:
$locationProvider.html5Mode(true);
<base href="/">
And then I changed my hrefs to be like this /home
The links worked with me, but ...
0
votes
1
answer
41
views
AngularJS .value(): not getting the Updated/Modified value in Controller
I have utilized the Value() Module in my AngularJS App.
I have declared and modified the Value, but I am not able to retrieve the modified or latest Value in a Controller.
Flow is as follows:
STEP 1: ...
0
votes
1
answer
1k
views
Update view when api get data in Angularjs
So, i have a little problem. I made a tiny webapp that uses the omdb api. The thing is this that when i type in the movie that i'm searching for then press the search button, the view should change to ...
0
votes
0
answers
122
views
ng-view not rendering partials in AngularJS v1.6.9
I'm learning AngularJS for a project but I got stuck in rendering a partial view. I've made the main page with three partial templates that need to be loaded in the main page. Also created a ...
0
votes
1
answer
683
views
Reload not working after AngularJs routing
I am facing a number of troubles related to AngularJs routing. I have already tried to find answers online but I still am not very clear with the solutions provided.
First of all, here is my routing ...
0
votes
3
answers
345
views
AngularJs routing is not working properly and bootstrap also not working
When i click on add button then i would like show message which is in AddController but routing is not working here i am going to give some of the screenshot and bootstrap also not working.
demo.js
...
0
votes
2
answers
218
views
Mapping AngularJs component in routing when() method
I am trying to create my first AngularJS app.
But I can not understand why my routing is not working properly(i think there is some problem in my when() method and directory structure).
Here is my ...
0
votes
1
answer
40
views
Acessing third level's states
I'm trying to route and access third level's states, but It is not working.
Please, someone may help me showing how to access submenu 'home1'?
I trying to make my code more nasted possible...
My code ...
1
vote
1
answer
55
views
How to correctly load javascript across pages when using the $routeProvider in Angular1
Currently, I make use of Angular's $routeProvider and $locationProvider to browse an SPA.
It's unclear to me how to implement javascript across pages using a controller.
As soon as I switch pages the ...
3
votes
2
answers
1k
views
AngularJS: Partial view not rendering
I am trying to load partial views in a single page application using angular. I have configured the routes as shown in my script file code below.
Following is my code for loading partial views:
var ...
0
votes
0
answers
37
views
How to properly use the ngRoute using the #!
I have this in my Login.cshtml
<div class="contact-widget" data-loader="button">
<div ng-view>
</div>
</div>
and to change the view I have this:
<ul class="one-...
-2
votes
2
answers
388
views
Angularjs Routing Parameter passing to controller
Below code is not working for parameter passing
<li class="active" ng-disabled="disabledAction"><a href="#!/Reservation/821" ><i class="fa fa-fw fa-pencil-square-o icon-push"><...
0
votes
2
answers
813
views
Routing not working when i click second time
hi all I am using angularjs and working with routing functionality (Route provider) it's working for first time only when I click the second menu it's not redirect and I am not getting any error also ...
1
vote
1
answer
943
views
Match route only if query param exists
I want to match this route if url is /test?x=5 and don't match if param x is not provided (/test):
stateProvider.state({
name: 'someState',
url: '/test?x',
template: '<div>matched&...
0
votes
1
answer
102
views
Pass 2 different parameter i.e. Id and Name in angularJS Routing
Pass 2 parameter in url using routing in Angularjs.
i.e. i want the url is like /Business/Industry/3/Aviation
Here is the MVC Controller:
public ActionResult Industry(int ServicesId, string ...
0
votes
2
answers
90
views
AngularJS - Shop list best practice
I'm new to AngularJS, and i'm want to know what's the best and easiest practices to do this simple shop list application.
So this is my shop:
I got three servers in my select input. Each server got ...