Tagged Questions
0
votes
0answers
19 views
Conditional routing in to the Angular appliaction
I have an existing Angular App using ui.router wherein multiple states are being internally called from one another. The initial state is directed using $urlRouterProvider as :
$urlRouterProvider....
0
votes
1answer
18 views
Puikinsh/gentelella admin dashboard with ui-router in angularjs
I am working in an angular project which uses puikinsh/gentelella
admin dashboard.When I use the ui.router the template's custom.min.js not working properly.
Which shows JQuery error : Dom elements ...
0
votes
1answer
23 views
$scope.$on not listening after browser refresh
I am using angular ui-router.
I have the following structure :
state a controller parentA
state a.b Controller childB
I have a resolved on state a.b that broadcast event 'event1' and I have a ...
0
votes
3answers
33 views
Partial Layout in Angular JS with new latest routes
/// <reference path="Scripts/angular.js" />
var myApp = angular.module("myModule", ["ngRoute"])
.config(function ($routeProvider) {
$routeProvider
...
1
vote
2answers
27 views
Update $state variable in 1 module from another
https://plnkr.co/edit/PWuKuVw9Dn9UJy6l8hZv?p=preview
I have 3 modules, routerApp, tickers and tags. Basically trying to rebuild my app out of smaller mini-apps.
The routerApp template contains the 2 ...
0
votes
0answers
19 views
Angular 1 uiRouter how to get full path with url query?
I'm trying to get the url path with it's current url queries using uiRouter.
What I want to achieve is something similar to:
window.location.pathname + window.location.search
How would one achieve ...
0
votes
1answer
12 views
Check whether ui-state has forward ui-state
I think it is a simple question but could not find on google. I am using angular 1.5 and ui-router 1.5. How do I check if current ui-view state had next ui-state? (This is required because I want to ...
0
votes
1answer
19 views
How to navigate from a login state to an abstract dashboard state?
https://plnkr.co/edit/ByatrCzdUJfAV3oc8XPq?p=preview
^ On line 10, if you put back in the abstract:true key you will see the tags view appear in this plnkr app.
However my problem is that in my real ...
0
votes
0answers
6 views
Lazyloading states with new ui-router 1.0.0-rc.1
I was trying to upgrade to ui-router 1.0.0-rc.1 , in gulp webpack setup . I am not able to figure out how to come up with a basic load states from the server and register it . Below is what I am ...
0
votes
0answers
20 views
Angular UI-Router Not Changing Title
I have code and I am trying to figure out the best way to have pages with their own title. Currently in the index.html it sets the title and somehow every page auto-inherits the title.
index.html ...
0
votes
1answer
23 views
UI-Router doesnt working as expected(NESTED VIEWS!)
I am trying to use ui-router on my current project. But somehow, when it comes to nested view(i think i wrote it proper and correct) it doesnt showing content of views.. Let me show you my code..
....
0
votes
0answers
22 views
how to add a fonticons in breadcrumb with routing
i have an angular base dashboard application ,in the application dashboard page icon ,when i click the particular icon ,the icon should be redirected to the routing page with menu breadcrumb with ...
0
votes
1answer
30 views
Template path instead of it self in AngularJS
I'm using Angular ui-Router and ui-View to serve them in the app. This is my routes index:
function routeConfig($stateProvider, $urlRouterProvider, $httpProvider, $locationProvider) {
$...
0
votes
0answers
17 views
A parameter of ui-router in controller and resolve
I have configured the following ui-router.
app.config(['$stateProvider', function ($stateProvider) {
$stateProvider
.state('global.editor', {
url: '/posts/editor/{id}',
...
0
votes
0answers
14 views
what is the difference between nested views vs nested states in angular-ui router
I am trying to understand angular-ui router(which rely on states). I was referring to link on github for understanding nested states and multiple named states. During this, I encountered term "state ...
1
vote
1answer
28 views
ui-router: doesn't load states into state
I want to create such a schema:
DOM schema
Navbar state must be always inserted, it have our template and controller.
Content state must insert templates and controllers depending on URL path. ...
0
votes
1answer
22 views
Angular $locationProvider not working to remove # from URL
I am new to angular, and I am trying to remove # from URL angular route using $locationProvider
but my code not working
I try this
<html>
<head>
<script src="https://ajax.googleapis....
0
votes
0answers
17 views
How to prevent direct templateurl navigation in browser when using ui-router in AngularJS?
Following is my code:
var app = angular
.module('moviesApp', ['ui.router'])
.config(function ($stateProvider, $locationProvider, $urlRouterProvider) {
...
0
votes
1answer
15 views
Angular UI Router - Partial GETs 404 Not Found
I'm currently working on a project using Material Design Lite and Angular JS. I'm having a problem setting up a simple route with angular UI router.
Here are links in the index's navbar.
<div ...
1
vote
0answers
24 views
AngularJS ui-router states with optional query params
Somebody knows how to create states structure with angular ui-router (AngularJS) that permits something like this:
1. https://urlexample.com/route?unknownParam1=1&unknownParam2=2....
2. https://...
1
vote
0answers
29 views
AngularJS injection
I'm having trouble finding what's wrong in my code.
so, i'm resolving an http.get with ui-route and then calling the controller.
Elsewhere it works fine, but in a particular controller it don't
So, ...
0
votes
0answers
25 views
How to display a font-icons instead of image in Uirouter state and uibreadcrumbs
Note: below code is working fine with images.
Need to know how to implement for font-icons,
when I have to click the product menu, the page will redirect to the product page, product page menu will ...
0
votes
0answers
17 views
How to setup ui-router for user-defined/perference on layouts
The idea is to have a user preference that allows them to have a single page view or a split page view.
My current app is setup for split page, left-side view will contain a list and on the right-...
0
votes
0answers
11 views
Injecting $stateRegistry in a controller AngularJs Typescript
I'm trying to use the register function of stateregistry provided in UI Router. I cannot figure out how to successfully inject it into the controller. I am trying to implement the solution referred in ...
0
votes
1answer
25 views
How do I setup ui-router to allow views inheritance?
How do I setup ui-router to allow views inheritance? Currently, I have my ui-router setup similar to as follows,
$stateProvider
.state('public', {
url: '/public',
...
0
votes
1answer
30 views
Angular UI routing - Any page refresh brings me back to the index page of my web portal
I am suffering this issue since the beginning of my website development. I am using rails as the backend framework. When I refresh any page, I am navigated to the index page.
For ex: if I am on www....
0
votes
1answer
16 views
md-tabs with angular ui-router not rendering grandchildren
I am using Angular 1.6.2 with Angular Material 1.3 and making fairly heavy use of components. I have an outer "appComponent" that wraps the rest of the app and provides a header toolbar with ...
0
votes
0answers
10 views
UI-Router 1.0: uiCanExit: de-register the callback
i am using Angular Ui-Router 1.0-RC1 and the new uiCanExit feature (see here).
I created a wrapper of the functionality, with:
a function that register a callback for the uiCanExit event of the ...
0
votes
0answers
26 views
Angular ui-router different view
For my project I want a different view for my login page,
If I use template directive only angular wrap my login page into index.html (the template of the app)
.state('login',{
url:'/',
...
0
votes
1answer
18 views
stateful bootstrap modal using ui-router in angularjs
I am trying to achieve stateful bootstrap modals using ui-router.
I have followed the approach given in the
Stackoverflow Solution for the same question
Though I am facing some issues as described ...
0
votes
1answer
12 views
$rootScope is not updated in SPA
My first controller:
angular.module('application')
.controller('FirstController',['$rootScope',function($rootScope) {
var data=[0,1,2];
$rootScope.items=data;
}...
0
votes
0answers
18 views
Angularjs: ui-router controller in views throws error
I am trying to inject a controller file which is loaded on state resolve, the controller is registered with $controllerProvider.register but yet the state throws an error when i'm trying to call the ...
1
vote
2answers
20 views
Angular UI Router works only on more than three directory in url
Why my Angular Router works only when directory is more than 3 (three). if not I'm getting error 404 when I refresh the browser
state('new', {
url: '/new', // works when I use /new/x/x/x
...
1
vote
0answers
23 views
$state.go() calls the controller of other state several times
Here are my states:
var states = angular.module("states", []);
states.config(function($stateProvider, $urlRouterProvider){
$urlRouterProvider.otherwise("/landingPage");
$stateProvider
....
0
votes
0answers
21 views
Passing 2 $stateParams using ui-sref
I am trying to pass 2 parameters to my controller, as I want to retrieve information from 2 different API endpoints. The code I have will load the html with data based the first parameter id: course....
0
votes
0answers
21 views
Inject service in app.config $routeProvider
I want to inject a service into app.config, so that i can set root url accordingly.
Note: I don't want to redirect to '/sign-in' location.
myApp.config(['$routeProvider','DBstore', function($...
1
vote
0answers
9 views
named sub-view not loading
I have just learnt using angular-ui router but I am unable to load subviews
that have names, please take a look at the following code
// default state is login
$urlRouterProvider.when('', "/login");
....
0
votes
1answer
12 views
How to add Bing UET tag using AngularJS
I wanted to know how to add Bing UET tag using AngularJS + ui-router. I've already added the Bing UET tag to the confirmation page but is not tracking any conversions.
Any help regarding this is ...
0
votes
0answers
21 views
AngularJS application shows file structure when I refresh
I currently have an AngularJS front end for my application. I have used ui-router for transitioning between states.
When I enable HTML5mode and refresh the page, the application ends up serving the ...
0
votes
2answers
21 views
Open link into tab redirect to the login page instead of given url
I am working with angularjs. When I right click on link and open it to new tab then it redirect to login page instead of given url.
<ul class="nav nav-sidebar">
<li><a ui-sref="...
0
votes
1answer
13 views
How can I remove CSS files loaded via $ocLazyLoad from a particular ui-router state?
Here is the basic setup of my app: I have a main application (myApp) and two modules underneath (view1, view2).
Here is myApp:
angular.module('myApp', [
'ngRoute',
'ui.router',
'oc.lazyLoad',
...
0
votes
1answer
15 views
Angular ui router tab - hide div when active
What is the easiest way to show/hide a div outside the tab content when on that specific tab only? My current example shows but I could not make it hide again.
Plunker: http://plnkr.co/edit/...
1
vote
2answers
30 views
Cannot get data from service after migrating to AngularJS 1.6.3
After migrating to AngularJS 1.6.3, I changed my services like below:
Here is my service:
MetronicApp.factory('MyService', ['$http', function($http) {
return {
get: function(id, success, ...
0
votes
2answers
16 views
angularjs state.go doesn't reload php file
I have a code which uses ui-router. It is navigating in 2 files(state). 1 is the php file which displays all the contents of an SQL db, while the other is an HTML file retrieving data from 1 row of ...
0
votes
2answers
27 views
ui-view is calling multiple times when another template is binding as child view
what iam trying is to get the child views for different states
my states code
routeConfig.$inject = ['$stateProvider'];
function routeConfig($stateProvider) {
$stateProvider.state('home', {
...
0
votes
1answer
27 views
angular UI route not work on page reload or direct URL hit
when i click on ui-sref="state1" or ui-sref="state" it's working fine, change the url like as http://demo/state1 or http://demo/state2 but on direct hit the url it's not working
HTML CODE
<html&...
0
votes
3answers
25 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. I have to make two router.js files. Is it possible to have two router.js files in same project. What are the cons of ...
0
votes
0answers
18 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
14 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
26 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 ...