All Questions
Tagged with angularjs-ng-if angularjs-scope
8 questions
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 ...
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. ...
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 ...
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)!=...
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. ...
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 = ...
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) {
...
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-...