Tagged Questions
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
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: '...
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
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
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 ...
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: $...
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
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
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
1answer
36 views
Spring and Angular JS HTML5 mode with abstract routing
I have a project Using Spring and Angular JS.
When I attempt to remove the ungly "/#/", I followed the following tutorial:
Configuring HTML 5 mode
in my index html file:
<base href="/">
in ...
0
votes
0answers
20 views
Ionic View from ui-sref not working
I am new to Angular and have the below error which I am trying hard to solve.
The codepen link can be found here
Expected behavior: When I click on the Share button, there should come a new HTML ...
0
votes
0answers
21 views
ui-router how to define multiple views in multiple modules for same state
I devide my application into separate modules. And now i need to make config in each module to define states for ui-router.
The issue is i want to show in same state (for instance "index") in ...
0
votes
2answers
23 views
AngularJs routes - scroll doesn't change after I go to another state
Simple question. When I scroll down and press any button that goes to a different state ($state.go('other_template')), the second state loads but the scroll continues at the same level where I left it ...
0
votes
1answer
28 views
Clear Angularjs state.go parameters
I am working on angularjs app. Its like CRUD app. Below is the app structure
Home (List) => "/#!/"
--- Details page => "/#!/home/details/-KcXruMX3ia6rokeZjCJ"
----- Edit page => "...
0
votes
0answers
12 views
Angular / Wordpress base issue
I trying to make one angular app on wordpress. My app works fine when it deploys in root directory, but when i place app in my wordpress theme (wp-content/theme/x_theme) it needs another base ('wp-...
0
votes
0answers
40 views
Can access response inside ng-click with ui route
I have a problem. Im confused because value from ng-model and ng-click can used inside templateUrl ui router. So, I have a template , example : thread.html. There are ng-click inside thread.html. So ...
0
votes
1answer
46 views
$locationProvider in angular url
Recently I have developed a website http://www.skduhariya.com, this is completely based on angularJS. I'm using the concept of ui-router for routing between the static pages. Symbol(#) is being ...
-1
votes
0answers
19 views
Ui router state change being blocked by callback functions
I have 3 nested states (a, b, c) inside another abstract state X. Each of these states has a controller (ctrlA, ctrlB, ctrlC, ctrlX).
In ctrlX, I make a bunch of http calls to load data. When the ...
0
votes
1answer
29 views
Change a state param and not reload the state. Feasible?
Using UI-Router v1.0rc1, is it possible to transition to the current state, changing only one param, without reloading the state. Let me give you my use case:
On the left of the page I show the ...
1
vote
3answers
56 views
Routing Angular JS Not Working and not throwing error
I tried to use $routeProvider. But something wrong and i dont know what. Console not throwing error and nothing happen in my page. Im confused. Any solution for me ?
This my code :
var app = angular....
0
votes
1answer
24 views
AngularJS - States from submodule not recognized by main module
I am currently geting an error trying to use states defined on my submodule. I am working on this AngularJS-Boilerplate and they code in a way that i am not very used to.
This is my main module:
;(...
0
votes
1answer
21 views
Angular UI-Router with component not working
I have a simple project that uses ui-router with component. For the 'hello' component, nothing happened if I clicked on the 'hello' link; if I clicked on the "About" link, then it showed the view ...
1
vote
1answer
69 views
Can not get grandchild state to work with UI Router
I am using Angular 1.6.2 and UI Router. I am still trying to learn the concepts correctly, but have come to a road block.
I have a parent state called app using MainController, and a bunch of child ...
0
votes
1answer
16 views
AngularJS application initializes only half of the time, throws no errors
Used the yeoman angular generator to scaffold out a fresh ng1 app. Had the following basic code for my main module. Notice that I am using ui-router for my routing system.
'use strict';
angular
....
0
votes
1answer
82 views
Cannot transition to abstract state (angular-ui-router)
https://plnkr.co/edit/5JhQx64WF3tgdm02qKzJ?p=preview
All I did that broke my app was remove the ui-sref (I never like using that anyways) and went with a $state.go inside of the Javascript.
<tr ...
0
votes
2answers
38 views
How to prevent sibling state controller from refreshing?
https://plnkr.co/edit/zfmuZXp88cSbdOsibv3y?p=preview
I have a main dashboard parent state with 2 child states tags and tickers.
When I click on a button in tickers, only the tags state should ...
1
vote
1answer
36 views
ui-router (Invalid params in state 'dash')
I'm trying to setup a demo to showcase a problem I'm having with sibling components/states.
However running into this error:
No idea what would be wrong here, as this is how we have it in our ...
0
votes
1answer
43 views
angular component resolved values showing undefined
I'm using Angular JS (version 1.5.9) and the Angular UI Router (version 1.0.0-rc.1).
When I'm trying to access binding values in component controller, it is showing undefined. Below I shared my code.
...
1
vote
1answer
28 views
Does $state.go from my current state to current state fires relevant events?
Suppose that I am in state A, and inside this state I have a button with ng-click like so:
$scope.go = function() {
$state.go("A");
}
I have a question that are these events: $stateChangeStart ...
1
vote
4answers
39 views
angularjs single page application URL error
Hi guys I created small SPA in angularjs. I have 3 links in navbar. When I click to the links instead of loading different pages in upload everytime the same page. Below is my routeProvder code:
'use ...
2
votes
1answer
32 views
Angular - ui-router wait for a promise before route
I am using Angular 1.5.8 and angular-ui-router 0.3.2.
I need to resolve an authentication method on every route change.
I dont want to add the resolve property for each route so I created this in App....
-1
votes
0answers
71 views
Hide params from URL Angular UI Routes
Hi is there any change to hide but load params from url. I need ID param because http request. But i don't want to display it on url.
.state('menu.list', {
url: '/:slug',
...
1
vote
1answer
25 views
Load a graph from a generated url
I want to build an online html/css/javascript playground. When the code draws a graph, I want to be able to generate a url, with which users could load this graph in a browser.
At the moment, in the ...
0
votes
3answers
41 views
Unwanted print error of rejected promise for state transition of ui-router to console
I am using the resolve property of ui-routers state definition for angular 1 to provide a function which returns a promise. The provided function should check if the user is allowed to visit the state ...
0
votes
0answers
9 views
Child controller invoke twice when using ui-router with uib-tabset
I have one array of tabs which I need to show. I am using ui-router and separate route and controller and view for each tab. Active tab is set depending on $index. Issue is that when I click on some ...
1
vote
2answers
95 views
How to prevent $state from refreshing any Component that does not rely on the $state.var being changed?
We're using Angular-ui-router for our app state management.
A problem we're having is that every component refreshes when the $state changes, even if it's a variable that is updated that does not ...
0
votes
1answer
28 views
How to define multiple ui-views in ui router in webpack
how to define multiple views in UI router using Webpack
My example.component.js file
import exampleHtml from './example.html';
import headerHtml from '../view/header.html';
let exampleComponent = {
...
1
vote
1answer
42 views
How do I setup angular ui-router states so that the main template does not refresh per state change?
As the user navigates between the sections(Dashboard and Project Details, etc) which all use the main template, the entire template is reloaded. I would like to see only the nested "main" and "appbar" ...