Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
105k views

ng-keyup firing but not reading properly when used with an ng-if inside a directive template

I have a directive and it works fine in a way such that when I type something the search() scope function inside my directive fires and sets $scope.query with the input text. here is the directive ...
cmgchess's user avatar
  • 10.3k
1 vote
1 answer
59k views

directive with ng-if not rendering in Angular.js

I'm trying to render a directive whenever I get the search results back. My plan was to keep a scope variable algoliaSearch initially false and whenever I get back search results I change it to true. ...
cmgchess's user avatar
  • 10.3k
0 votes
1 answer
165 views

ng-if does not work when placed outside of controller and $compile-ed with scope, but ng-show does

I have a plain angular application which adds variables to the scope and simply display them. Which is simple and working. But there is a part of the page that does not run in angular (practically it ...
Eric Wong's user avatar
  • 1,483
0 votes
1 answer
557 views

AngularJS getting value from function in ng-if and using that value in element

My question lies in the following code. Though the code is not working now. I wan't to rewrite it in proper way so that it works. <span ng-if="community = vm.getCommunity(invite.community_id)!=...
Mushfiqur Rahman's user avatar
1 vote
0 answers
640 views

Again: ng-click not working inside ng-repeat inside ng-if

This is most likely going to be another Angular scope question. I looked hard for a solution on SO, however, nothing I found would solve my problem. I am using Angular.js together with Swiper.js. ...
kalabalik's user avatar
  • 3,832
0 votes
0 answers
460 views

display or hide loading from multiple controllers

I'm trying to create a generic loading that would be shared among controllers. So, I've created a service that will control the hide/show state: (function () { 'use strict'; var module = ...
Thiago Custodio's user avatar
0 votes
2 answers
34 views

How to refactor this logic in the template/view to use a single line if statement (AngularJS 1.x)

I am fixing some small issues within our AngularJS application - I've come across the logic below which simply displays one link. In pseudocode style.. if (data.serviceId exists in the DOM) { ...
Zabs's user avatar
  • 14.2k
1 vote
3 answers
3k views

How to call a javascript function from ng-if outside of controller scope-AngularJS

I have a plain javascript function display(str) which I want to call inside ng-if. This function is outside the scope of controller HTML <body ng-app="myApp"> <div id="mycntrl" ng-...
Nishant123's user avatar
  • 1,966