Questions tagged [controlleras]
22 questions
0
votes
0 answers
do not working controllerAs in the component
I made some modifications to the way the component was created.
The code looks like:
Question is why I should define var navbar = this; pose class ComponentCtrl If I have defined controllerAs : 'navbar' ?
Second question is so, if I have in this…

Aneta Jabłońska
- 125
- 1
- 10
0
votes
1 answer
AngularJS - ControllerAs ng-click not working
I'm struggling with getting no response from an ng-click on a project I'm working on. To isolate the problem, I've created a simple plunkr:
https://plnkr.co/edit/N4tDDcP5wmeKC5keSHAj?p=preview
There are no error messages on page load, no error…

Blakey UK
- 53
- 8
0
votes
1 answer
When using the angularjs "controllerAs" syntax is it still good practice to have a container object?
I've recently found the controllerAs syntax and I'm wondering if it precludes the need for wrapping your scope variables in objects in order to get the reference.
Sorry I'm probably not asking clearly but what I mean is are both of the following…

LiamRyan
- 1,892
- 4
- 32
- 61
0
votes
0 answers
AngularJS: ngOptions not working (ngModel included, using "controller as" syntax)
I'll keep this short.
http://codepen.io/anon/pen/waXWpw?editors=101
Here's something I made that hopefully illustrates my problem (I also hope I have Plunker working correctly...). The first dropdown is my attempt, and the other is one I took from…

Matthew Oldham
- 61
- 1
- 6
0
votes
2 answers
Unit testing ControllerAs with forms in AngularJS
I have the following situation with Angular:
Controller
function Controller () {
// form used in template
this.form ...
}
Template that has a form and uses this controller
Template
0
votes
2 answers
Angularjs+Typescsript: Best approach to upload file (using controlleras syntax)
I have a working example below, but I think it's not the right approach!
My requirments are:
I don't want to use external plugins!
Use controlleras syntax
Use Typescript
Html:

A.Akram
- 412
- 5
- 22
0
votes
2 answers
Controller loaded twice using ui-router + custom directive
I am trying to bring to my homepage a custom directive which will print me some output.
In the network tab in my devtools I just saw that my controller loads twice.
controller:
var homeController = function($log,leaguesFactory){
var self =…

Dima Gimburg
- 1,376
- 3
- 17
- 35