Tagged Questions
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
0answers
17 views
Angular - when refreshing page, slash is being appended to url
I have the problem that whenever I refresh the page, a slash is being added to the url. Im being automatically (with timeout) directed to the state 'home' from the state 'intro'.When I go to home, ...
0
votes
2answers
67 views
UI Router - how to store data between states without passing them explicitly to $state.go(…)?
I have language code in Gallerycomponent:
function Gallery(LanguageService) {
var $ctrl = this;
$ctrl.$onInit = function () {
$ctrl.code = LanguageService.language;
_loadGallery($ctrl....
1
vote
2answers
80 views
How to display navigation and footer in every page in Angularjs?
I'm making a SPA. I want to make a separate component for Navigation, Section, and footer. Navigation and footer must display for every page when I go to Home or About page, only the Section should ...
0
votes
0answers
23 views
AngularJS 1.x Multiple named and nested views needles refreshing
I'm trying to create a multi-viewed page with states, and when changing the url (for example: studentDetails) only a single view changes and the others stay the same.
I almost made it, but when ...
0
votes
1answer
27 views
Angular directive with transcluded elements + RequireJS not working
In this punk I'm attempting to have an Angular directive with transclude: true and RequireJS. The transcluded elements should be included in an Angular UI Modal that is opened when a user clicks on a ...
0
votes
1answer
40 views
ui-router html5Mode doesn't like hrefs to static html files
When using ui-router without html5Mode (using hangbang URL syntax), anchor tags that do a full page refresh to other pages (or static html content) using hrefs are working properly. As soon as I ...
1
vote
1answer
78 views
directive in nested ui-view called twice
I'm using ui-router with components. The navigation is working great and the component $onInit is called once (as expected) but in the directive's $onInit (directive as element in component template) ...
0
votes
0answers
20 views
scroll to $index on enterState
I use a bootstrap-ui accordion
<uib-accordion close-others="true">
<uib-accordion-group ng-repeat="e in list" is-open="status[$index]" ng-init="status[$index]=false" index="$...
1
vote
0answers
129 views
Issue with Parent Child Scope With Modal: Using angular ui router with angular bootstrap modal ($uibModal)
Here is my current code:
Parent Controller
vm.animationsEnabled = true;
vm.open = function (size) {
var modalInstance = $uibModal.open({
animation: vm....
1
vote
2answers
31 views
ui-view inside another not showing
I have a question regarding Angular UI-Router and its ui-views. I declare three ui-views inside another one, and the only one that shows up is the one with the name "languages". I don't understand why ...
0
votes
1answer
39 views
ui-router Dynamic routing issue
is there using angularJS 1.5 and ui.router to define State and routes dynamically?
I mean getting the data from a backend sever and then populate the ui-router param such as state, URL ...
I tried to ...
0
votes
1answer
21 views
Angular ui-router parameter causes conflicts with other states
Just to give some context, I have an Angular application with several separate modules. I am working with ui-router to provide routing to these modules, and I want to use the names of the modules in ...
0
votes
1answer
47 views
Bootstrap alert message is not working inside angular run blocks under ui-router?
I am doing sample application to autologut if user is idle for 30 Min. before 1 minutes to logOut have to show an warning message to the user.
So i have calculated the minutes and show the warning ...
0
votes
1answer
59 views
Angularjs nested ui view not working
In one of my applications, I have created a maincontroller and a main page with ui-view. A main_live_video_chat.html is being loaded into the main page ui-view. This subpage main_live_video_chat.html ...
1
vote
1answer
35 views
Angular UI-Router childs
I have an app.config with UI-Router. It has a login page with it's controller, recoverLogin and I want to put a template with footer, header and more stuff with new states that could be loaded into ...
0
votes
1answer
50 views
Angularjs ui router needs to load child state by default similar to home page
I am using angularjs ui router and I need to load the child state by default (i.e., 'dashboardParent.dashboard').
$stateProvider.state('dashboardParent', {
abstract: true,
url: '/...
0
votes
0answers
394 views
Using a controller as uibModal Controller
So I am working on a module called "ShowTree".
Before this, I have a controller named "InviteUserCtrl". Inside the ShowTree module, there is a button that will show a uibModal that is used to add new ...
0
votes
1answer
111 views
UI-Router, I am trying to pass id in the url, but I keep getting nothing
I am trying pass id in the url so that it can be use by other page more specifically the detail page but i keep getting nothing. the url is going to the correct route but the id is not getting passed ...
0
votes
1answer
57 views
AngularJS UI routing $stateChangeStart dont work as expected
I have created an app with angular ui routing and states. Also I have a WEB API controller that can use to learn if user is authenticated or not. The problem is that http request to that WEB API has ...
2
votes
1answer
47 views
UI-Router parent controller doesn't initiate
I'm using AngularJs UI-Router for my app, but I'm with a problem where the parent's controller isn't initiated.
This is my state structure:
.state('main', {
abstract: true,
controller: '...
0
votes
1answer
101 views
Angular UI Router - using ui-sref on child view to change parent view
Im fairly new to angular UI. I am trying to have a ui-view that has a child a tag that has an sref that will change its parent ui-view
Something like this:
<html>
<head>
<meta ...
0
votes
0answers
58 views
Close ,opened particular modal on page loads in angular-ui bootstrap
i have a code in routing like this
.state('resetPassword', {
url: '/home/reset_password',
templateUrl: 'home/home.html',
controller: 'HomeController'...
1
vote
1answer
57 views
Angular UI router - child of abstract state not inheriting data in $stateChangeStart
According to the top answer to this question...
Acess parameters of parent state from child state in stateChangeStart
When you inject toState into $stateChageStart it's supposed to inherit/merge ...
0
votes
1answer
128 views
UI-Router optional url parameter preceeding static part
I'm using the 1.x version of UI-Router. I have a site that is broken up by location, each location has identical layouts and content for its pages:
mysite.com
mysite.com/location1
mysite.com/...
1
vote
0answers
333 views
$destroy event called after $state change (angular ui)
i m using ui router for state management. i have some directives that are behaving as listeners of some events
app.directive('signer', ['Constant', "GlobalService",
function (constant, ...
1
vote
1answer
16 views
how to design a state with ui-router that replaces the content only of index.html with two files and two controllers
How to design a state with UI-Router that replaces the CONTENT ONLY of index.html with two files and two controllers.
i have views/dishDetail.html & views/comment.html and
I`m trying this:
....
0
votes
0answers
23 views
Do I really have to set a url in angular-ui when making states?
When i code the states using
$stateProvider.state('test.state', { templateUrl: 'my-template.html' });
It still successfully changes to a different state even if I did not specify the url.
It got me ...
-1
votes
1answer
25 views
What are the libraries included for type ahead in angularjs
I want to run autocomplete with filtering based on the search in tex tbox. I want to know what are the libraries to be included in the head section.
0
votes
2answers
400 views
Render partial view in angular JS
Is there any way to create a partial view like .net MVC in angular JS. I'd like to achieve the same partial view functionality in angular JS.
For Ex.
I want to reuse a modal popup in all page so I ...
0
votes
1answer
41 views
How can i show parent template and child template using state providers
I want to have single parent view and partial child views in a page i am using state providers.
AngularJs code:
state('packs', {
//controller:'PacksController',
...
0
votes
0answers
19 views
In-Module Routing in AngularJS
I have a dashboard where x modules are integrated.
Means It looks like:
<div ng-controller="ACtrl"></div>
<div ng-controller="BCtrl"></div>
<div ng-controller="ACtrl">&...
0
votes
2answers
195 views
Uncaught Error: [$injector:modulerr] Failed to instantiate module sangamApp due to: Error: [$injector:unpr] Unknown provider: $stateProvider
I want to display a calendar on my webpage , the below code works fine if i dont put ['ui.calendar'] in angular.module(), but in that case , the calendar is not being displayed , and if i add that to ...
0
votes
1answer
41 views
How to form the Query string in web address url in Angular state router by using state go method
I have a product list page, there have list of products,when click the particular products, call the function and in the function state.go.
Not working in dynamic:
$state.go('home.product.detail', { ...
1
vote
1answer
148 views
angular ui tabs active based on ui-router state
I'm getting this error:
Error: [$compile:nonassign] Expression '$state.current.name==='admin.adminDetails'' used with directive 'tab' is non-assignable!
Trying to activate tabs based off of url:
&...
2
votes
2answers
218 views
Nested States and Query Parameters
In my app, I'd like to have a separate view/controller for a child state with just a query param. Something along the lines of
.state('article') {
url: '/articles/:articleID',
controller: '...
0
votes
1answer
89 views
Reloading only child state
I have nested UI states. I want to load only child state not the parent state.
Child State :
$stateProvider.state('app.test', {
url: '^/test?search',
controller: 'TestController',
...
1
vote
2answers
159 views
Use Typescript into Angular 1.5
Using Angular 1.5.5, I try to use Typescript so I configured gulp tasks successfully ; now I try to make a service in typescript with this code in SampleService.ts:
module app {
class ...
1
vote
2answers
61 views
Unable to navigate to child state in ui router
I have state as follow. I can navigate from app to app.child1. But I cannot navigate from app.child1 to app.child1.child2. There is no error in browser console. Do note that I am developing an ionic ...
0
votes
1answer
240 views
Abstract child state and grandchild state in angular with UI-Router
Have had issues trying to implement an abstract child state that belongs to an abstract parent state and has child states itself. Something like the following:
.state('parent', {
abstract: true,
...
3
votes
1answer
90 views
Angular JS - UI-Router: Reload state on click
I'am using Angular JS with UI-Router,
I want to reload state, when we click on the state link from the same state.
I fixed it with the following code,
<a ui-sref="page1" ui-sref-opts="{reload: ...
0
votes
1answer
24 views
UI router child views
I am building an angularJS app. My pages contain a header, content and footer. Header and Footer are consistent for all the pages. Currently I have placed the header and footer in the index.html file ...
1
vote
2answers
1k views
Angular ui-state with params type in typescript
What I know
When using TypeScript with angular's ui state, I can provide "type assertion" with the UI-Router definitely typed library.
Using this, I can inject $state and have code similar to the ...
0
votes
2answers
157 views
$urlRouterProvider $stateProvider otherwise does not work
Hi below is my code for urlRouterProvider otherwise.
.config(function config($urlRouterProvider, $stateProvider) {
$urlRouterProvider.otherwise('/invalid');
$stateProvider.state('view', {
url: '/...
0
votes
1answer
280 views
Can I access $stateParams from a state's view object?
Using, Angular UI-Router, I have the following state:
$stateProvider
.state('blog.article', {
url: '/:slug',
template: '<article></article>',
views: {
}
}...
0
votes
1answer
37 views
Hide previously opened child views when linking to parent with ui-sref
I have a map with markers on it. When you click a marker a child view opens with the marker details.
.state('map', {
url: '/map',
...
})
.state('map.detail', {
url: '/:markerId',
...
}...
1
vote
1answer
134 views
How to reload a single named view with Angular UI-Router
I have a screen that is made up of 1 state and many nested views in that state
state 1:
view 1:
view 1.a:
view 1.b:
view 1.c:
view 2:
view 3:
view 3.a:
...
1
vote
1answer
121 views
UI router nested view not resolving
I am using UI Router Multiple Views concept.
The documentation says that i can have resolve on individual views. As you can see in my plunker, I have a resolve on my child view. The resolve returns ...
1
vote
1answer
30 views
Filling common views in abstract state in UI-Router
Would this result in presenting the page with header, footer and content block filled with content.list view?
$stateProvider
.state('contacts', {
abstract: true,
url: '/contacts',
...
0
votes
1answer
317 views
ionic : $location.path works only if I use $scope.$apply()
I am very new to ionic and trying to implement camera functionality. I have setup states as below in routes.js
.config(function($stateProvider, $urlRouterProvider) {
// Ionic uses AngularUI Router ...