Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
2 answers
91 views

Call angularjs directive function from controller

I've got a directive that needs to do something every now and then, let's say it has to count something. If I use the basic syntax with $scope to bind the count function, it works just fine. but when ...
Dan Mihai Patrascu's user avatar
0 votes
1 answer
40 views

AngularJS scope variable value change not reflecting across controllers

In my angularjs, i have two controllers and use the variable which is referred in UI. From UI I am calling method OpenPage of NumTwoController which updates value of variable1 and NumOneController ...
useruser00's user avatar
1 vote
1 answer
38 views

Get ControllerAs alias inside base controller in AngularJS

We have legacy code written in AngularJS that does not use controllerAs. Sample Plunker Our BaseController (Plunker: script.js line 19) has this code to make all class methods available in $scope ...
Justinas's user avatar
  • 43.8k
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 ...
MindTheBit's user avatar
0 votes
1 answer
83 views

Unable to use controller as syntax to set up directive (scope mismatch)

I am pulling my hair out trying to get a directive called webix-ui to assume the same scope level as parent scope. This code is the closest to making webix-ui work, but the element still sees ...
Vahe's user avatar
  • 1,851
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 ...
Ryan's user avatar
  • 18.2k
0 votes
0 answers
35 views

Communication between AngularJS controllers

I'm trying to trigger an action defined in one controller from second one. I've gone through this question, but I can't see what I am doing wrong. Here goes the code: window.cartApp = angular.module '...
gonczor's user avatar
  • 4,174
1 vote
0 answers
27 views

AngularJS scope is passed to directive after directive's factory function exits [duplicate]

I'm trying to upgrade an AngularJS template we're using to its latest version. Now, this template upgraded to AngularJS 1.6.9. But now, after i've upgraded, i'm experiencing a problem that the vm ...
ashilon's user avatar
  • 1,981
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 ...
user avatar
0 votes
1 answer
143 views

AngularJS 1 injecting $scope inline in one controller breaks second controller

I am trying to improve on the W3Cschools "get something output" syntax for coding AngularJS controllers by following the community driven style guide on Github As advised, I want to Avoid use of $...
rupertrealbear's user avatar
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:...
nickj's user avatar
  • 360
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. ...
Bryan Dellinger's user avatar
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=...
Ido Bleicher's user avatar
1 vote
2 answers
78 views

Can you use ControllerAs syntax within separate Controllers that share the same view?

QUESTION: Can you use ControllerAs syntax within separate Controllers that share the same view? ie: (var vm = this)? DILEMMA I'm trying to get rid of the linter error in my console generated by ...
Crystal's user avatar
  • 1,515
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. ...
Jimenemex's user avatar
  • 3,186

15 30 50 per page
1
2 3 4 5
8