Tagged Questions
1
vote
1answer
27 views
Angular $http get parameters
I'm trying to figure out how to include query parameters in an Angular $http get call to a service to retrieve search suggestions AND then search, search is not working - I can get suggestions. I'm ...
0
votes
0answers
23 views
$urlRouterProvider.otherwise('/') not working
What am I missing? Why would the Home template NOT load via .otherwise('/')? If I link to href="/#/" or ui-sref="home" everything works fine. However the Home template does NOT load if I try $...
0
votes
1answer
21 views
How to update only browser url, not the state in AngularJs
Lets say, there is application, that can be run for different units, with different names. Before, when user select another unit, we just reinstating controller, and load new data for new unit, this ...
0
votes
0answers
19 views
URL in ui-router is encoding improperly and won't show the templated information
I'm following a tutorial on getting started with Angular 1.x (to bolster my understanding of everything I learned over at Codecademy)and I've just gotten to the ui-router portion of the tutorial. Here ...
0
votes
0answers
15 views
ui-router and htaccess for Angular 1(sub url not refreshing)
I can't get the sub url to work when refresh the sub url or go straight to it.
Here is my config for ui-router:
app.config(['$urlRouterProvider', '$stateProvider', '$locationProvider', function($...
0
votes
0answers
19 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 = {
...
0
votes
1answer
18 views
I have 2 app.run method.how to halt in first method until promise is resolved?
angular.module('app', [
... ])
.constant('AppConstants', constants)
.config(appConfig)
.run((UserService, User) => {
'ngInject';
console.log('apprun')
UserService.acl()
...
0
votes
2answers
34 views
Getting error with angular
I'm doing a Rails 5 application.
I have a simple code for showing sign-in page.
var app = angular.module('app', ['ui.router']).config([
'$stateProvider',
'$urlRouterProvider',
function($...
1
vote
1answer
31 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" ...
0
votes
1answer
19 views
AngularJS routes and search query
I'm building a small search engine using Angular and UI Router. I'm trying to figure the best way to transition from the home page (search submission) to the results page.
I have this for my home ...
0
votes
3answers
29 views
Angular JS : Post call is going in Success as well as Error Method
I know I amy look like foolish while asking this, but I am not able to figure this out.
I have written a service which handles the post call to the server. $q service is returning the promise back ...
0
votes
1answer
26 views
how to make url with dynamic username in angular 1?
I am new to angularJs (version 1), I am trying to write a route for my application using ui-router.
My application opens on the browser using the below link:
http://localhost:8000/ that is converted ...
0
votes
0answers
20 views
Parent's state params empty on $urlRouterProvider.otherwise state reload
I have my state configurations defined as below:
$stateProvider
.state('parentState', {
abstract: true,
url: '/:tenantId/',
param: {
tenantId: {
...
0
votes
0answers
10 views
Angular1 and Adsesne
I have an angular app. I am trying to log what pages are viewing the ads. I have my analytics and my Adsense accounts linked and I can see the data in the publisher view. I have embedded the analytics ...
1
vote
1answer
28 views
Angular UI router Intialising
I am trying to use Angular UI router in my application. When I initialise the UI router instead of getting say, localhost:8000/#/ I get localhost:8000/#!#%2F.
My app.js is as follows:
angular
....
0
votes
0answers
28 views
angular-ui-router: $state.go not reloading the template
I have a template which is fetched from a web server in the route "items.all" this contains a list of items with delete buttons.
<a title="Delete" ng-click="main.delete(44)">Delete</a>
...
1
vote
2answers
45 views
angular-ui-router v 0.4.2 with Angular 1.6.1
i am basically trying to make a simple routing:
where i have defined the following in app.js
(function () {
"use strict";
var app = angular.module("productManagment", ["common.services", "ui....
0
votes
0answers
12 views
AngularJS ui-router keep state loaded in background
I am designing an AngularJS project in which one of the states loads a view with a flash object. How would I keep the flash object loaded in the background in between state changes so that the object ...
1
vote
2answers
29 views
Ui-router - difference between {slug} and :slug
I use ui-router in my project, I saw both in documentation:
.state('app.restaurants.index', {
url: '/{slug}',
controller: 'listRestaurantsController',
templateUrl: '/app/user/views/...
0
votes
1answer
18 views
Use a provider to run a command onEntet
I'm using ui-router to change states in an AngularJS application. I have a provider that uses JavaScript to create a graph in the HTML where a div exists. Only one of the views has the div element ...
0
votes
0answers
24 views
ui-router multi level nested Views
I've a parent view/state called home under which I've three children names HomeOne, HomeTwo, HomeThree. Under HomeThree I'm trying to load a view which will be a child for two other children. When I ...
0
votes
0answers
35 views
Angular-UI-router resolve not working
I got this problem where when i use resolve in Angular-ui-router causes my site to do hundreds of get requests per second but not load the view. I am using the full MEAN-stack.
The views are created ...
0
votes
0answers
13 views
The best way to edit og meta tags in angular
I need to customize meta property="og:title" (for ex.) tags and I need some feedback for my code.
Some routes have custom og meta tags and ngMeta looks like over engineering for me, in most of cases ...
0
votes
0answers
17 views
Mocking async service in protractor?
When I load a view in my Angular app I load some data through angular-ui-routers resolve method.
$stateProvider.state({
name: 'myview',
component: 'myViewComponent',
url: '/...
-1
votes
0answers
20 views
passing ui state from one angular module to another angular module [on hold]
Situation is like this: I have two angular modules: module1 and module2. I have a ui-router configuration associated with module1. Say I have two states in that: stateA and stateB. Also, I have two ...
0
votes
1answer
29 views
Angular ui-sref, can't format date input
Trying to append a GET URL with a date, but it needs to be in the format "yyyyMMdd00".
Despite trying all the solutions here:
AngularJS - convert dates in controller
and
Binding value to input ...
0
votes
0answers
13 views
how to bind angular components with ui-router
I am trying to test angular v1.6.2 components and ui-router together but can't get it to work. Here is my
html:
<!DOCTYPE html>
<html lang="en" ng-app="rrrwamac">
<head>
...
2
votes
1answer
30 views
AngularJS Routing using ui-router
Is it possible to have routing as follows in angular?
I'm using ui-router for routing, Angular version is 1.4 FYI
.state('home', {
url: '/:city',
controller: 'HomeCtrl',
templateUrl: 'templates/...
0
votes
1answer
22 views
AngularJS child route always redirect to otherwise using $stateProvider
I have this routing config and the problem is that whenever I access a child route, it always redirects to otherwise. Which in this case is /login
$stateProvider
.state('login', {
url: '/...
1
vote
1answer
37 views
Angular Js Application with two different layouts
I have been working on large angularJs application which have multiple modules. Problem is that now I have to include static website in that application and that website have whole different layout ...
0
votes
0answers
15 views
How to pass events between two child routes - AngularJs 1 and UI Router
I am having 3 routes
Search form [call it form-view]
Based on criteria show a table of records [call this table-view]
Once you select a row from table- show the details[detailed-view].
...
0
votes
1answer
27 views
Switch among different templates/views
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. My current JSBin cannot accomplish this ...
0
votes
1answer
22 views
Don't update URL
I have a piece of code, which displays a list of file names. Clicking on each file name shows its body on the right hand. And we could add files to the list.
After clicking on each file name, the url ...
1
vote
1answer
57 views
AngularJS $state open link in new tab using ctrl + click
I'm trying to open a link in new tab just like a normal link would open when ctrl + clicked, except it has ui-sref directive attached to it which generate a href attribute with /stateName?param1=test&...
0
votes
1answer
33 views
Can a $rootScope variable be passed in state file - AngularJS
I'm working on an Angular project and currently am working on making the entire project configurable. I have an object which contains an array of elements, each element being an object with the ...
0
votes
2answers
30 views
how to integrate a static landing page with its own design at root route using ui-router
I am working on an angular js 1.x application by using ui-router and have come up with a bottleneck since I am new to angular js ,so please forgive me if I sound silly.
Problem:
I have a main ...
0
votes
0answers
13 views
ui-router, how to refresh state if resolve fails
I have the following resolve functions in a route called 'payments`:
PaymentAdvice(PaymentsService) {
'ngInject';
return PaymentsService.getPaymentAdvice();
...
1
vote
0answers
8 views
Re-using provider functionality from angular ui-router resolve
I have an angular app where I have created a provider that I use for getting the user and authorization. In my app.config I setup routes with ui-router. For the first route I am using the resolve ...
-2
votes
0answers
21 views
How to Make Sure Scripts Don't Load Twice in AngularJS [closed]
I'm trying to devise a way of making sure that my scripts don't load a resource it already has. If at all possible I would like to do this in module.js which loads the template and controllers setup ...
1
vote
1answer
23 views
How to escape UI router params in ui-sref
I have a list of clients and I want to pass the client name using $stateParams
<a ui-sref="cmd.projects_by_client_id({
clientId:{{client.vid[0].value}},
client:'{{client.title[0].value}}' <-...
0
votes
2answers
23 views
How to stop ui-router from reloading resolve when params change
I have an app with a base app ui router state...
$stateProvider.state('app', {
navigationTitleKey : 'app',
abstract: true,
url: '/?{param}',
views: obj
});
And then a child and grand-child ...
-1
votes
1answer
29 views
AngularJS Add security and Local-storage Watch
I have a angularJS application which is using angular ui-router for routing.
I added the following level of security but that doesn't helped me out:
I am storing token and user role in local storage....
0
votes
3answers
41 views
How to update headers in $resource when routing to a new state
I'm trying to implement JWT token in this project. For that I used Authorization header in the $resource, like as this.
When I login on UI state "A", after getting logged in, I put the token in the ...
0
votes
1answer
27 views
Angular UI router sub states not working on IE
As I said in my other question, I'm creating a webapp in AngularJS with NodeJS, Express and Angular-UI-Router.
At first I couldn't get the page to load at all (I managed to solve that problem), now ...
-1
votes
1answer
37 views
Angular UI-Router, not found on URL refreshing [duplicate]
When I type http://localhost:6060/home, it showed me cannot get /home, but when I click the button $state.go('home'), it shows, and the URL is still http://localhost:6060/home. But when I refresh, it ...
0
votes
2answers
23 views
AngularJS ui.router giving me a blank page
I see a couple unanswered question along these lines - hopefully, I will state this in a way that elicits a solution. Thanks in advance
AngularJS 1 - using grunt
index.html
<!doctype html >
&...
1
vote
2answers
43 views
AngularJS Node app downloads instead of loading in Internet Explorer
Whenever I try loading my AngularJS webpage (on a node js + express server) through http://localhost:3000, Internet Explorer just tries to download it with a random name and no file extension, instead ...
0
votes
0answers
30 views
Angular.js Dynamic routing with templateUrl
I have a web site where the code is organised in 3 folders: websiteTemplate-Front with angular.js- Back witn node.js.
I need to create a dynamic routing when the user when he click on the logo picture ...
0
votes
1answer
30 views
Error: $injector:modulerr Module Error in angular1
I have implemented ui-router in my angular 1 application and also configured the route state. When I try to access the page, I get the error as mentioned in the title of this post. Please find my code ...
0
votes
1answer
29 views
ionic/angular $state.go gives blank screen for login page
I'm trying to implement a login/auth page using firebase for my ionic app, but am encountering some issues.
I use tabs in the main part of my app, but when I try and redirect a user to the login page ...