Tagged Questions
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
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 ...
0
votes
2answers
37 views
Give URL with ID in Angular UI Router
I have a problem, when I edited data, my url not showing id example : /answer/1 or /answer/2 or /answer/3 etc. Im confused because Im using UI ROUTER
I'm a beginner use UI ROUTER angularjs. Can you ...
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 ...
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....
1
vote
2answers
39 views
Make two layouts share the same $scope
I want to propose two layouts (ie, horizontal and vertical) for my contents. So switching in the selector will lead automatically to the corresponding layout. Here is the JSBin:
<html ng-app="...
1
vote
1answer
23 views
ng:btstrpd err App Already Bootstrapped with this Element?
It's entirely possible I'm doing something stupid ...
Full stack trace of the Error
Error: [ng:btstrpd] App Already Bootstrapped with this Element < html class="js flexbox flexboxlegacy canvas ...
0
votes
2answers
37 views
Routes When Importing Not Working
I am currently attempting to add routing to my Angular 2 project. All of the components work, but when I add 'appRoutes' to my imports on app.module.ts , an error gets thrown saying
Uncaught ...
2
votes
1answer
64 views
$stateParams empty ui router
I have a state as such:
.state('home.deletemsg', {
views: {
"contentworker@": {
url: '/delete/:entityname/:id/:redirectstate',
templateUrl: "Scripts/proteanapp/templates/delete.html",
...
0
votes
0answers
24 views
AngularJS with dynamic stateful views / routes
TLDR; Is there any way for me to automatically keep routes from unloading and keep state preserved?
I am trying to build a client-side application where I want to be able to keep state (data, in-...
0
votes
1answer
63 views
ngroute change master page for specific route
I want to know if its possible to change the master page which is used by ngroute for specific pages.
For example, I want to display different master page or exclude completely the master page for ...
0
votes
0answers
30 views
customize url using ui-router
My folder structure is like this
index.html
app.js
view/compare.html
assets/js/angular.min.js
assets/js/angular-ui-router.min.js
i want a custom url for view/compare.html page like /compare only. ...
1
vote
0answers
15 views
Angular js 1 : stateProvider … how to configure state and its child state once parent is resolved and then child
I am working on angular js state providers...I am using parent states and its child states.
For example ..
Parent state is 'home'(url:/home) and its child state is 'home.profile'(url:/home/profile)
...
0
votes
2answers
236 views
Get params from URL using $stateParams, UI-router. Undefined Value
I am passing a value from one state to another using UI-Router. In my controller when the url is updated I am trying to get access to the second parameter of my url using $stateParams, but for some ...
1
vote
1answer
27 views
Why do I get a duplication of div while using ui-router?
I wrote a simple demo to try to understand ui router.
But the problem is, I got a duplicate view while using ui router.
Here's the stateProvider part
app.config(function($stateProvider,$...
1
vote
2answers
175 views
Angular ui-router render different component based on route params
Using Angular UI Router, I'm trying to render a different component based on a $state.params value, but I can't find a clean way to do this.
I figured out a working solution already (with some ES2015 ...
2
votes
1answer
90 views
Override the parent url with child url in UI-router (Angular)
This is the configuration i'm using for my ui-router:
.state('parent', {
url: '/child1'
controller: ParentController,
abstract: true
})
.state('parent.child1', {
url: ''
})
.state('...
0
votes
0answers
21 views
Maintain State of the view and edit using angular route
I am trying to build and application where I'll be having 2 users
1 will be having view right and other one will be having View + Edit right. There are "n" no of feilds in each page so I am thinking ...
1
vote
1answer
49 views
use ui-sref only if the parameter is defined
Here is my following code:
view:
<div class="single-user" ui-sref-active="activeState" ui-sref="app.usersingle({id:item[0].id})">
<li class="userTicket">Total: {{item[0]....
1
vote
3answers
447 views
Multiple named views with dynamic routing in angularjs
Edit: Here is the complete code at Plunker. Though I can not c anything in execution but same code working at local. However gives a console error though
It all works perfect. But due to :id in /...
2
votes
1answer
42 views
Angularjs select controller and template dynamically
I want to make routes to access user profiles and pages which made by users like belows.
http://example.com/username http://example.com/page_url
This should identify in the routing process by ...
1
vote
1answer
35 views
Issue with using the same template for different states on ui-router
I'm trying to use the same template for 2 different views. My set up is this
$stateProvider.state('me', {
url: '/me',
templateUrl: 'partial/profile/profile.html',
controller: '...
1
vote
1answer
300 views
angular-ui-router doesn't work
I doesn't manage to route using ui-router. It does work for me with ng-route, so I must have missed something basic. There is no error but I don't get any view.
The following code does not work (...
0
votes
3answers
316 views
Angular ui-router shows old stale data after transition back to state
We have an ASP.NET MVC 5 application which uses ui-router AngularJS module.
When we go back to a state that has already been loaded, it always shows the old data until we do a full page refresh.
For ...
5
votes
1answer
147 views
ios address bar triggered when angular ui router state changes
I am using Angular UI Router. Whenever I click on a link with ui-sref the address bar from ios mobile browser shows up. For example when I scroll down, the address bar hides and if I click on a link ...
0
votes
1answer
55 views
AngularJs- UI-router parent layout by child layout
I am using angular js for creating spa(single page application) app.But i am facing issue while updating base layout by child layout.
Here is my app structure ::
Anyone help me to design my app.
...
2
votes
3answers
268 views
How to do $state.go() with params?
I have perfectly initialized $stateProvider and I'm using all this states with ui-sref. Works great.
User presses the button and thorugh the $stateProvider goes to the edit page.
On this page I ...
1
vote
1answer
2k views
Angular : pass parameter to controller from $routeProvider.when
I perform a routing upon a broadcast and I need to pass a parameter from $rootScope.$on to a controller through routing.
$rootScope.$on('unauthorized_access', function (event, args) {
$location....
2
votes
1answer
80 views
How to use AngularJS UI Router?
I'm trying to use AngularJS UI Router to load view1 and view2, but they're being not loading into the index.html page. Can you please help?
This is the link to whole project in Plunker
Also below, ...
0
votes
0answers
198 views
angular 1.5 component router issue with query-string parameters
I am trying to set up $routeConfig parameter of component routing in angular 1.5. I want request with any path to go to component named myTestComponent.
Here is how I have set up my component with ...
0
votes
1answer
69 views
Controller not recognized by HTML after $state.go()
I'm fairly new to Angular and very new to using the ui-router, so I could be missing something obvious.
If I launch my results.html page on its own, everything from the Web API is bound correctly ...
1
vote
1answer
85 views
unable to navigate page in angularjs
I tried to navigate from aangularjs page to another page but it doesnt work.
My nodejs file is
app.get('/signup', function(req, res, next) {
res.sendFile(path.join(__dirname, '../public/...
2
votes
1answer
236 views
Navigation using Angularjs $state.go
I'm trying to create a simple navigation area in my single-page application. It is made up of a bunch of links in a list. Each one calls a method in a NavigationController. The method, in turn, calls $...
0
votes
1answer
23 views
Setting controller dynamically Angular
I have a query related to setting controllers at runtime.
I want something like:
.state{'app.thisState',
url: '/thisUrl',
views:{
templateUrl: 'templates/some_template.html',
...
1
vote
1answer
688 views
How to append query strings to the URL in Angular ui-router
I am pretty new to AngularJS. I am using ui-router and node.js as my UI server for API calls to another server. Right now, I am having trouble appending query strings to the URL depending on user ...
1
vote
0answers
143 views
In Angularjs with ui-router how to change hash without reloading controller but keeping subviews routing enabled
In short: my demo, how to have subviews? (without reloading page)
Longer:
I'm using snapscroll to provide different screens effect (demo). This directive doesn't support by default ui-router so I ...
1
vote
1answer
48 views
Angular routing issue - ionic header not updated in tab
Have begun the hockey stick learning curve of angular and ionic and following along on a Linda course. I made some type of routing mistake (most likely a typo) and are stuck..
The problem is that my ...
0
votes
3answers
163 views
Angular promise should call other promises
I have a state which resolves as :
resolve: {
accounts: function(utils) {
return utils.getAccounts();
},
data: function(utils) {
...
1
vote
1answer
77 views
angular routing : resolve vs. controller
I haven't find an answer on the Internet so I came here to ask for help :
What is the best practice to use when changing a state in AngularJS ?
The first that I found is using ui.router with the ...
1
vote
1answer
37 views
Ui-sref routing parameters not passed
Here's my state definition:
.state('root.countryreport', {
url: '/report/:country',
params: {
data: null
},
views: {
'container@': {
...
1
vote
1answer
61 views
AngularJS service is not updating the view
I have a service declared in my application.js file within my AngularJS project. It looks like this:
application.factory('interfaceService', function ($rootScope, $timeout) {
var interfaceService ...
1
vote
1answer
70 views
Passing result of resolve into controller with UI-Route
I'm trying to learn how to use resolves with UI-Router, and I think there's a piece of information I'm missing, because I can't figure out how to make them work.
I have a state set like this:
app....
1
vote
1answer
110 views
Angular ui-router Url localized
I'd like to have localization in URL like this:
http://example.com/de -> get German locale (DE)
http://example.com/it -> get Italian locale (IT)
So I did an abstract route like this:
state('...
0
votes
2answers
76 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
141 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 ...
5
votes
1answer
6k views
Unknown provider: $routeParamsProvider <- $routeParams
I am currently learning AngularJS & Ionic by creating a simple podcast app.
I am trying to use routeParams to get the "itemId" but I am getting the following error:
Error: [$injector:unpr] ...
1
vote
1answer
62 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'
.state('...
0
votes
2answers
44 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 ui-...
1
vote
1answer
33 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 ...
3
votes
1answer
189 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: '...