All Questions
Tagged with angular-controller angular-ui-router
15 questions
0
votes
0
answers
166
views
Uncaught ReferenceError: MainCategoriesListController is not defined error is coming
The error:
MainCategoriesListController is not defined
is coming at its declaration only ,i.e, angular.module().controller(~~,~~).
Also, in categories state, in the resolve property when i try to ...
2
votes
1
answer
1k
views
UI Router, Passing Data From Parent Controller
I'm attempting to refactor a website into Angular through UI-Router. On the parent component I have defined some data on the controller. How do I pass this data to the child nested routed component ...
1
vote
1
answer
162
views
Angular.js - Not understanding why my controller function isn't firing
This is taken from Jason Watmore's tutorial on building an Angular.js modal window: http://jasonwatmore.com/post/2016/07/13/angularjs-custom-modal-example-tutorial
This is a separate file called ...
0
votes
1
answer
716
views
How to stop angular from creating multiple instances of a controller every time we use $state.go
I am using UI router for angular routing. Everytime $state.go() is called a new instance of the controller is being created. I have $rootScope events here. So everytime I want to print any log (using ...
1
vote
0
answers
68
views
How i check if a dynamically loaded Angular Controller has been regestered
I have created an application that loads routes dynamically and in turn there controllers.
My controllers are added using an ng-repeat in my index file and then bootstrapped manually.
The issue i ...
1
vote
1
answer
4k
views
Angular : pass parameter to controller from $routeProvider.when
I perform a routing upon a broadcast and I need to pass a parameter from $rootScope.$on to a controller through routing.
$rootScope.$on('unauthorized_access', function (event, args) {
$location....
0
votes
1
answer
444
views
Redirect to other view with controller method and routh
i want when user click on someone user ,show new view for that information.
I have two controlles,first get list of user,and it is work fine,but second controller have function which hava param of ...
0
votes
1
answer
34
views
Setting controller dynamically Angular
I have a query related to setting controllers at runtime.
I want something like:
.state{'app.thisState',
url: '/thisUrl',
views:{
templateUrl: 'templates/some_template.html',
...
3
votes
3
answers
173
views
What is the simplest way to load a controller when i change the view?
I'd like to load a controller when I change from one view to another.
For example, I'm in the home page and user wants to go to the log in page. I have a LoginController in a file that is not include ...
0
votes
2
answers
74
views
Angular JS pass parameter one controller to another
I have two controllers in my app TimelineController and ReservationModalController. I want to call TimelineController from ReservationModalController and pass variable value. I'm trying to that:
this ...
0
votes
2
answers
612
views
Function return different response using $q.defer in controller and resolve
I have created a state using state provider and i used resolve, i called api using factory.
.state('Test', {
url: '/Test/:testId',
templateUrl: TEMPLATE_URL + 'Test/test.html',
...
1
vote
1
answer
3k
views
Assigning separate controller files in AngularJS's UI Router
I am new to AngularJS and AngularJS's UI Router. I have a basic index.html file in which I inject the views. And then I have app.js with the routes inside, a template client.html and a controller ...
0
votes
1
answer
190
views
nested ng-controller fires $locationChangeStart?
I have some parent Ctrl which has locationChangeStart function implememted. Also I have Child controller which binds data from html to parent controller
html:
<div> <!-- parent ctrl setted ...
0
votes
1
answer
108
views
Using $scope and 'this' in the controller with Angular UI Router
Regarding $scope and this when using ui-router,
If I am using the controllerAs syntax, ie:
.config(['$stateProvider', function($stateProvider) {
$stateProvider
.state('app.login', {
...
1
vote
1
answer
547
views
Open multiple instances of same controller with different data
I have an angular app that allows the users to open details about a product on a modal window. The modal has corresponding url with it (/product/:id). A requirement of the app is that the users should ...