All Questions
Tagged with angularjs-controlleras javascript
54 questions
0
votes
1
answer
45
views
Expression not working in the view that is set by a service in AngularJS
I'm quite stuck on trying to access the view with an expression that obviously fails to work. I have a Service:
angular.module('myApp', []).service('myService', function($timeout){
this.sayHello ...
0
votes
1
answer
81
views
Updating Property in callback with Controller As
I'm working on an AngularJS project using ES6 and Controller As syntax and running into some new issues. I have a ng-repeat which calls a function to update some data. I want the item passed to a ...
0
votes
1
answer
171
views
controller as syntax not working with angular 1.4.5 var vm = this template not showing
I had switched to controller as syntax with angular 1.5 -1.6 projects etc...
The particular project I am need to add some functionality to a angular 1.4.5 project.
Usually I using angular routing ...
0
votes
2
answers
560
views
angularjs 1.6.6 component controller not registered error, how to fix this issue?
I'm using angularjs 1.6.6 - and using gulp.
This is my current codes.
e.g.: AppLayout component
/// app-layout.component.js
angular.module('app').component('appLayout', {
templateUrl:...
3
votes
1
answer
2k
views
using ControllerAs in an angular 1.5 component
I am attempting to use the controllerAs Syntax in an angularjs 1.5 component.
here is a plunker https://plnkr.co/edit/mTa1bvoNi1Qew9l1xAFS?p=preview
without the controllerAs everything works fine.
...
0
votes
1
answer
62
views
javascript Angularjs validation not showing
I am using ex6 and angularjs and I write an angularjs validation form.
the HTML doesn't show up. it's not showing any errors.
The HTML of the validation :
<form id="form" name="login.sign" class=...
0
votes
1
answer
88
views
ng-click not firing with Controller-As syntax
In my HTML, I have a ng-click directive and it's calling a function in my ProductListCtrl. I'm using the Controller As syntax and I don't know why it's not working. You usually just attach it to this. ...
1
vote
1
answer
34
views
Refactor AngularJS to use controllerAs, apply CSS for a required input once it is not empty
What would be the most efficient way of conditionally changing the background color for a required input once it is valid using AngularJS 1.5.6? Per my understanding and what I have read online, I ...
1
vote
1
answer
3k
views
AngularJS Material mdDialog and display locals in a template
Part of the controller which spawn mdDialog looks like
$scope.removeAttendee = function(item) {
console.log(item);
$mdDialog.show({
controller: DialogController,
templateUrl:...
0
votes
2
answers
499
views
angular directive controller doesn't see passed parameters update
I have problems using controllerAs in angular directive. When the data is passed to the directive as parameter i want to do some simple transformation and pass it down to child directive. On ...
1
vote
1
answer
414
views
angular directive with controllerAs dosn't work
I'm struggling with making angular directive work with controllerAs. When using $scope everything work as expected but when get rid of $scope directive controller doesn't work. Please see the code ...
0
votes
2
answers
47
views
Errors when using 'ControllerAs' but works fine when using '$scope' in ng-repeat checkbox
When using '$scope' syntax, checking on individual checkbox correctly outputs its corresponding object name but when applying 'ControllerAs' syntax to same code, checking on individual checkbox ...
1
vote
1
answer
96
views
Accessing controller from compile function in directives
I have searched all over and the only thing I can come up with is that I don't understand something fundamental about how the compile function works.
Here is what I have
angular.module("app", [])
....
0
votes
0
answers
62
views
IE : Angular Controller As losing scope when there is error in other JavaScript library
I am using the ControllerAs syntax in AngularJs. The issue I am facing is that there is an error being thrown by the jQuery library when other javascript library calls the jQuery which is run parallel ...
2
votes
1
answer
60
views
Why are my controllers methods not available?
after a long time I have to concentrate an angular again.
But I fail...
... ng-repeat="n in DataController.getObjects"
myApp.controller('DataController', [function () {
console.log('test 1');
...