All Questions
Tagged with angularjs-scope angularjs-routing
84 questions
1
vote
1
answer
54
views
How to correctly load javascript across pages when using the $routeProvider in Angular1
Currently, I make use of Angular's $routeProvider and $locationProvider to browse an SPA.
It's unclear to me how to implement javascript across pages using a controller.
As soon as I switch pages the ...
0
votes
2
answers
3k
views
Angular routing to redirect on new server with query string
Can someone help me understand how I can redirect an Angular state to a new URL with the query string parameters same as old ones?
Example
If my Angular application is on http://example.com, then ...
0
votes
2
answers
4k
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
2
answers
4k
views
How can I change URL from $scope in AngularJS?
I have made access navigation with $scope and I used them based on click and I did. I can't set URL in variable accommodate. The correct URL is http://www.example.com/base/index or http://www.example....
2
votes
2
answers
589
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="...
0
votes
1
answer
81
views
Injecting $location service makes my url with fragment identifier weird
Here is my angular code
var app = angular.module('app', []);
app.controller('mainController', ['$location', '$scope', '$log', function(location, scope, log) {
log.info(location.path());
}]);
And ...
5
votes
4
answers
564
views
$scope not working in my nav bar controller?
My Angular app is developed using a boilerplate of this yeoman generator.
Routing and all things working fine but I could not get to working $scope only on navbar-controller.js and footer-controller....
0
votes
1
answer
116
views
AngularJS back/forward button update model/scope
I'm having an issue with AngularJS and URLS. When I press the back/forward buttons in the browser I want my models to update accordingly. As you can see from this page:
http://www.networkwestmidlands....
0
votes
1
answer
40
views
$location.search() used with external function reset whole $scope. How to avoid it?
Example of problem: Plunker
Its about controller.js file. I am trying to pass cleanSearchParameters output into $location.search function and it does work, but after whole $scope gets reset.
Check ...
0
votes
1
answer
84
views
$location.search() - how to use params from scope inside $scope.$watch function?
I need to pass function variable into $scope and reuse it inside $scope.$watch. I don't know why my whole $scope get resetting all the time in first example.
Living example of my problem:
Plunker
...
2
votes
2
answers
1k
views
$resolve not added to $scope until after controller creation
I'm trying to take advantage of the (new in 1.5.0) feature that adds the resolve map to the scope of the route. However, it seems like the map isn't actually getting added to the scope until after ...
0
votes
2
answers
208
views
Display different template on selecting an option in menu
I'm trying to display different templates on selecting the menu options. I'm able to display it, but I want the menu to be displayed along with respective template selected in menu list (i.e., I want ...
0
votes
1
answer
55
views
UI routing not working, angular JS
I'm trying to display main.html template via UI routing, but its not working for some reason. Can someone please point out the mistake in my code. Thank you.
appModule
"use strict";
angular.module("...
1
vote
1
answer
156
views
Data not binded after browser history back
I do have a webpage based on jHipster template and issue with browser back button.
Let's say that I do have two pages
Articles list (/articles/{id},{name}, category id, category name)
Article ...
0
votes
1
answer
286
views
Angular ng-view is not replacing the view
I have below code as
<!DOCTYPE html>
<html ng-app="mainApp">
<head>
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="https:...