Tagged Questions
0
votes
1answer
18 views
Directives not loading in order when navigating between pages that reuse directives
I have a two separate pages that use the same controller.
I'm using ui router states to change between pages.
They contain the following directives which use templateUrl for templates in order:
Page A
...
0
votes
1answer
63 views
How to delay execution of a controller (angularjs) till an external JS file loads?
I'm working on a Youtube API based project in which I've already bootstrapped angular.
I'm encountering a problem when I need to call an external JS to load the iFrame API js file first and then allow ...
0
votes
0answers
41 views
Angularjs - inject controller dependency automatically in $scope
Is there a way to inject automatically a dependency (or a resolve) in the $scope without manually append it to $scope ?
(with or without UI-Router)
Would the "controllerAs" syntax be of any help ?
...
0
votes
1answer
419 views
$scope.$emit not working while $rootScope.$broadcast does
Here's my parent controller where I listen for the event
app.controller("SectionLayoutController", function($scope) {
$scope.$on("sectionLayout.doAction", function(e, options) {
// do some ...
1
vote
2answers
42 views
Altering $scope controller variables on URL
I have a simple web app that is just a table with formatted JSON data. When you click on a column, you can filter that column in ascending order.
I would like for actions like that to change the url ...
1
vote
1answer
236 views
how to reference a controller inside a sub-module in angularjs
I'm using modules /sub modules on the angular app, my controller doesn't load on a specific route but the view does, according to a comment on this question I should reference the child module inside ...
2
votes
1answer
313 views
$stateParams returning undefined
I have these routes defined:
.state('sport',
url: '/sport'
templateUrl: '/templates/sport'
controller: 'SportCtrl'
)
.state('sport.selected'
url: '/:sport'
...
1
vote
1answer
133 views
ngRouter/uiRouter preserve controllers when changing view
Is there anyway to preserve route controllers in Angular when using routing?
Everytime I change the view, the old controller is destroyed and a new one created, but I was wondering if there was a way ...
1
vote
1answer
1k views
Angular ui.router, call parent controller function from child controller?
I'm using Angular with ui.router and have setup a nested view. The parent view has a div whose visibility I can toggle through a function on the parent controller. I'd like to call this function from ...