Questions tagged [angularjs-ng-switch]

The ngSwitch directive is used to conditionally swap DOM structure on your template based on a scope expression

The ngSwitch directive is used to conditionally swap DOM structure on your template based on a scope expression. Elements within ngSwitch but without ngSwitchWhen or ngSwitchDefault directives will be preserved at the location as specified in the template.

Doc Link

28 questions
0
votes
1 answer

Angular JS - adding a custom directive to an element with ng-switch-when directive

Using AngularJS 1.5, I've built a custom attribute directive, that adds a date-range-picker directive, and it's options, to the element : app.directive('clSingleDatePicker', function($compile) { var opts_single_date = { singleDatePicker:…
0
votes
2 answers

Can you pass an array of values into an ngSwitch?

I have a functioning ngSwitch
Do 2
Do 4
Default
StatusIds can contain one or more…
Andrew Fraser
  • 78
  • 2
  • 9
0
votes
1 answer
0
votes
1 answer

Angular JS ng-switch not working

I am developing an application with Laravel and Angular JS. I am using [[ ]] for data binding. On binding data in table with ng-switch is getting error and not working. [[category.Name]] …
Jishad
  • 2,876
  • 8
  • 33
  • 62
0
votes
0 answers

Performance of many ng-switch alternatives in ng-repeat directives

I currently work on an angular directive to display a generic form, based on a json description. I am concerned to ng-repeat over all inputs and ng-switch or ng-if-iterate on all possible input types that could be in the list. There will be about…
0
votes
2 answers

AngularJS 'ng-switch-when' with an expression

I know ng-switch-when expects a value, but I created a ng-repeat with it. What do I need to make for this to work?:
0
votes
1 answer

angularjs - ngswitch with 4 conditions

I need to write an angular ng-switch with 4 conditions. Some other answers here on SO suggest using ng-if instead of ng-switch. And so I tried with the ng-if, but I don't really think this is the best way and I'll explain why: Basically I need to…
Nick
  • 13,493
  • 8
  • 51
  • 98
0
votes
1 answer

angular and ionic - ng-switch to change url

I'm working on an angular app, and I'm trying to set up a repeater with ng-switch. The code I have so far looks like this:
Nick
  • 13,493
  • 8
  • 51
  • 98
0
votes
2 answers

ng-switch to place elements

Any better way to write this? I just dont want to repeat the inner content of the list twice.
0
votes
0 answers

ngTransclude in ngSwitch

I have a popover, and this popover has ngTransclude. We show/set popup with ngSwitch (true/false). The issue here is that ngTransclude is inside ngSwitch and this slows down the application, because every time we show a popover we have to…
0
votes
1 answer

How to put $last ngRepeat result out of href?

Is there any option to put $last ng-repeat result like this
  • Four
  • instead of
  • Four
  • ? I have been trying with ng-if but unfortunately it did not give good solution yet :( DEMO:…
    Mo.
    • 26,306
    • 36
    • 159
    • 225
    0
    votes
    1 answer

    ngSwitch does not update when data model change

    I'm new to Angular and trying to write some simple app. I have problem using ngSwitch to switch the according directive on demand as follow. the html markups : main html file: directiveOne:…
    user804293
    • 187
    • 1
    • 6
    • 16
    -2
    votes
    1 answer

    How to watch for ngSwitchCase in Ionic 2 / Angular 2?

    I have a simple ngSwitchCase scenario I want to watch for and get notified of ngSwitchCase in the controller, Basically when i switch between tabs. Any ideas?
    Patrioticcow
    • 26,422
    • 75
    • 217
    • 337
    1
    2