Tagged Questions
0
votes
3answers
21 views
Can we make two router.js file in a single angular project?
I am having a situation in my Angular UI routing project while rendering the view. Situation is that I have to make two router.js file.Is it possible to have two router.js file in same project. What ...
0
votes
0answers
14 views
Angular UI router 0.2.15, browser back/forward button not working
I used angular v1.4.7 with UI router 0.2.15, I used $state.go and
ui-sref in case when from html to go to another state. I am unable to
go back. I checked on browser back/forward button but i ...
0
votes
0answers
10 views
How to compile sticky state plugin for Angular 1
I need the Sticky States feature for my project.
I'm using UI Router 1.0.0-rc.1 so i can't use the ui-router-extras library (that was designed for 0.xxx)
Recently the author ported that feature for ...
0
votes
0answers
20 views
ui-router resolve use angular-loading-bar?
What I want to do is to use the ui-router resolution angular install-bar.
How can I run the codes given in Resolve?
resolve: {
return {
loadedData: function($rootScope, $q) {
var ...
0
votes
0answers
21 views
Angular ui-router 1.0.0rc transition superseded on a redirect
Angular 1.6.1 and ui-router 1.0.0rc;
I'm running into an issue with ui-router while redirecting from one state to another.
A TransitionRejection is registered because it's superseded.
Transition #1 ...
0
votes
1answer
22 views
angular interceptor check response data
I am very new to the angularjs, basically i want to check all $http request with angularjs interceptor and if the response data match 401 then redirect to login page
Any help appreciated
0
votes
0answers
24 views
Angular ui-router: change content of named view
I'm writing an SPA with AngularJS and Ui-Router so I have this situation,this is the snippet of my router:
$stateProvider
.state('profile',{
views: {
'filters': {
templateUrl: '...
0
votes
1answer
21 views
Nested states generate wrong base path
I am trying to create nested states of multiple levels. Unfortunately, something seems to be wrong. In any state, when you refresh the browser, everything works fine. Except in the app.admin.training ...
1
vote
1answer
34 views
Dynamic URLs in angular
I currently Angular 1.6 and angular-ui/ui-router
I have a problem with dynamic url which I don't know a limit of parameter
example
www.example.com/name/hello/address/telephone/postcode/city/ .... (...
0
votes
1answer
21 views
Angular UI Router child state params
I'm using Angular 1.x with Angular UI Router.
I'm looking for a way to bind parameters in child states like this:
$stateProvider
.state('parameters', {
url: '/parametres',
...
0
votes
0answers
20 views
Browser navigation button change url but not load state
I have an angular app with following state structure
Home
Home.Child1
Home.Child1.Child11
Home.Child1.Child12
Home.Child2
Home.Child2.Child21
Home.Child2.Child22
When I navigate to any of ...
0
votes
0answers
13 views
angular app errors upon back button click from 3rd party website
when i click back button from any 3rd party web site to go back to my angular app, I see lots of console errors and my angular app fails to load.
Uncaught TypeError: no access
at :10:29
at :...
0
votes
3answers
27 views
reload controller on back button angular-ui-router
How to reload the controller when the user click the back button???
I am using AngularJS v1.6.2 and angular-ui-router 0.4.2
The states:
...
.state('cars.bmw', {
cache: false,
...
0
votes
1answer
26 views
Using ui-routers's state params as a model
I have a simple angualr application which have dashboard that shows the different views of items. The /dasboard/:item is an abstract state. My valid urls are /dasboard/item0/view0, /dashboard/item1/...
0
votes
1answer
26 views
route from parent to child triger resolve on parent
I have routes like this (using ui-router):
$stateProvider
.state('studies', {
url: '/studies?all&field&term&page&sort&sort_dir',
templateUrl: '...
0
votes
2answers
52 views
How to open $state,go() in new tab
I am trying to open a state in newtab but not able to achieven it. I am doing so using $state,go function.
I tried the below code too which was succesful and opend my url in newtab but browser is ...
0
votes
0answers
28 views
How to separate menu into different view in AngularJS ui-router application?
I have this:
<!-- Fixed navbar -->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button ...
0
votes
0answers
28 views
Angular ui-router doesnt resolve and work properly
While using ui-router i tried for resolve , is there any accesstoken in localstorage , if so proceed to state 'home' else state 'login'. But the program doesnt run as desired, if there is no ...
1
vote
1answer
38 views
AngularJS ui.router won't load template
I'm still learning AngularJS and having trouble with UI Router.
It just won't load the template.
Here's my code:
<body class="top-navigation" ng-app="mixcontainer">
<div id="wrapper"&...
0
votes
2answers
45 views
Resolve a function and use its side effect to record data in a service
I am making a web page with ui-router. Before we enter the controller, I want some operations to be done: 1) create a temporary folder in the server and write some files; 2) record the name of the ...
2
votes
1answer
35 views
How to swap views in angularJS?
I am trying to create an angular application.
When the index.html page is loaded 2 links login and register are displayed.
When either login or register is clicked the entire view is replaced by the ...
1
vote
0answers
54 views
+50
Structuring an angular app for server side filtering and pagination
tl;dr
What would be best approach for structuring an angular app which supports filtering and sorting on the server side using radio button filters on client side
Context of the app:
I have a sample ...
0
votes
0answers
32 views
AngularJS ui-router : i have send param to $state.go() to nested state and nothing happened
I have a state like this
.state('topic.content', {
url: '/:id',
resolve: {
topicContent: ($stateParams, TopicService) => {
return TopicService.getContent({ topicId: $...
1
vote
1answer
16 views
parent template also displaying on child state. how to get rid off this issue?
I am using angular ui router 0.2.15 and there is one page /profile and now want to edit the profile on click of button and url become /profile/edit.
Now I was bit confused between named views and ...
0
votes
1answer
31 views
I am trying to make a simple shopping cart but im struck at adding products to cart?
I'm new to angular ,I'm trying to develop a simple shopping cart, I have just created list of products but I'm not getting how I would add them to cart?
here is my plunker link:https://plnkr.co/edit/...
0
votes
0answers
18 views
On subpage I want a new routing system using Angular-UI-Router
Trying UI-Router - this is not a SPA - but multiple pages with collection of SPA built in as subpages
I want a user to navigate to the user to http://domain/comp. This is a subpage with essentially ...
0
votes
0answers
14 views
Is there anyway to detect ui-router routing of angularjs in express routing
I am new to both angular and node. I am working on a project which has social sharing but due to angular issues it was not happening correctly. So I found a solution to reroute the url when facebook ...
0
votes
3answers
60 views
Why ng-class is not applied as per the current state of ui router?
My application has two different views (page1 and page2), which has been configured with ui-router's stateProvider. I want to apply a css on the body based on what page I am looking at. If I am ...
4
votes
3answers
209 views
+100
Make a web page with a folder of external files
Previously, I used $sce.trustAsHtml(aString) to inject a string (eg, <html>...</html>) to a template <div ng-bind-html="content"></div> to display a graph when loading a ...
0
votes
0answers
19 views
Redirect in UI-Router $stateChangeStart
We have an enrollment system where users cannot move to the next step (a UI-router state) unless they complete the current step. i.e. a user cannot move to "Email Verification" (step 2 on enrollment) ...
-1
votes
0answers
21 views
Angular 1.x and ui-router in laravel how to deal with big app?
I have a web app which is made with Angular 1.5, ui-router and I'm using Gulp to build it. The angular app is loaded inside a Laravel framework.
My application is growing and is becoming bigger and ...
0
votes
0answers
19 views
Can I use nested components linked with same app module? Is it good practise? Using component Router
Here is component structure of my application. Any advice will be valuable. Root component is app.
Which has two components as child : login & home.
home has two child components : dummy-...
0
votes
2answers
20 views
How to open a angularJS modal when the url has a queryString
I want to develop a web site. I want to open a $uiModal when the url has a querystring. If the query string is not there then no modal is oepn. The code is:
myApp.controller('jobObjectiveController', ...
0
votes
1answer
44 views
+50
ui-router display raw code in my ui-views when the page is accessed
This is my first time using ui-router and I find difficulties in handling routing and reloading some states. I hope anyone can help me with this.
overview of my index.html
<html ng-app="resApp"&...
0
votes
1answer
16 views
migrate from ngRoute to ui.router $rootScope.$on '$stateChangeStart' not triggering
I am trying to create a authentication system. I stubled upon this (plunk) tutorial which is great but uses ngRoute and i wish to stwitch to ui.router.
After some hard time trying to do it by myself, ...
0
votes
2answers
39 views
+50
SPA from url not on root (and including a filename.aspx) routing and refresh
I have a SPA, I want to use routing for ng-view.
I have the code included in a page at domain.com/folder/dashboard.aspx
This is just a piece of that existing page, I can't move it elsewhere.
When ...
0
votes
1answer
40 views
I can't navigate to state ui router from address bar
I have a problem navigating to a state from the address bar or when i refresh the current state.
i have the following code:
Controller:
$scope.selectCategory = function(category) {
$location....
0
votes
1answer
24 views
Angular 1.6 ES6 No-error no app
How explaine this ?
Notice: use ui-router
I think is the probleme.
$stateProvider
.state('login',{
url:'/',
/*controller:'loginController',*/
controller: function(){alert(...
0
votes
1answer
15 views
How to pass parameters in AngulrJs through $stateProvider?
I want to pass an id parameter from URL to controller.
here it is my config file
$stateProvider.state('main.edit_tutor', {
url : '/home/edit/:id', // here I want to pass Id
views:{
...
0
votes
0answers
18 views
Ionic Framework - Routing inside <ion-side-menu> is not tracked by <ion-nav-view>
As Ionic Framework Doc explain, navigation inside <ion-nav-view> will be tracked so that <ion-nav-buttons> and <ion-nav-buttons> in <ion-nav-bar> will work properly to show if ...
0
votes
0answers
19 views
dynamic stateparams without updating url in app.js
.state('index.menu.generics', {
url: '/:section/:subsection/:layout/:json',
views: {
'content@': {
controller: 'gridCtrl',
templateUrl: 'shared/simple-grid/partials/grid....
1
vote
1answer
27 views
Access initial parameter value while navigating with angular-ui-router
The entry point to my application is an URL with an unknown parameter value, e.g.:
http://www.host.com/key/25
and my simplified configuration looks like this:
$stateProvider.state('home', {
...
0
votes
0answers
25 views
Nested States & Nested View not working in ui router angular js
I have a problem. I use 2 controller in 1 navigation like this
thread
click button go to answer
Thread and Answer different controller.
So, I use this in table thread (go to view answer)
<...
0
votes
0answers
49 views
angular-ui-router parent template not rendered while child state resolving
I have an app with two states, one a child of the other.
The parent state contains a simple template:
<div class="container">
<h1>Heading</h1>
<loading-spinner ng-if="$ctrl....
0
votes
2answers
35 views
Angular ui route hide modal
How can I close a modal, with ng-click on angular ui route?
I have this HTML file with UI route angular:
<div ui-view="modalView"></div>
<div ui-sref="openModal">Open Modal</...
0
votes
1answer
34 views
ngRoute is not changing view when click of <a> tag
I am new to Angular JS and stuck in an issue...i dont know what is happening.Please help to fix it.
I have index file and app.js is connected ,app is using ngRoute...see code below.
var app = ...
0
votes
0answers
15 views
Restrict access to all child states angular ui-router?
I'm trying to restrict access to all child states of a state. Currently, I'm using
$rootScope.on('$stateChangeStart', function(event, next) {
Auth.isLoggedInSync(function(loggedIn, role_type) {
...
0
votes
0answers
55 views
AngularJS - UI Router not working (Cannot GET /state)
I have defined states using the ui-router like this:
(function() {
'use strict';
angular.module('test.app').config(['$stateProvider', '$urlRouterProvider', '$locationProvider', function($...
0
votes
0answers
25 views
AngularJS 1.5: Dynamically create states with UI router from mySQL database
Premise
I have an SQL database of clients using a webapp I've created in Angularjs. How it currently works is each client has a state within the UI router which I have added manually like so:
.state(...
0
votes
0answers
16 views
Page Reload Fail When Using Html5 Mode True in Angular UI Router
I have a problem, I did remove #! in my URL with $locationProvider.html5Mode(true);. I checked my page is good if I switch in another page. But, if I reload my page like http://example-page/thread or ...