What does the question mark do in an Angular isolate scope binding?

jonhobbs

I have read a lot of articles explaining the difference between @, = and &. I've seen a lot of people using =? in their code. What does this mean?

Unfortunately, I can't seem to search on Google or SO for an answer because search engines ignore special characters.

SomeKittens

The ? makes the property optional. Otherwise, you'll get NON_ASSIGNABLE_MODEL_EXPRESSION where Angular is looking for a property that doesn't exist.

From the docs:

If the parent scope property doesn't exist, it will throw a NON_ASSIGNABLE_MODEL_EXPRESSION exception. You can avoid this behavior using =? or =?attr in order to flag the property as optional.

https://docs.angularjs.org/api/ng/service/$compile#-scope-

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

isolate scope angular binding not updated from geolocation

From Dev

What does question mark mean?

From Dev

Optional two-way binding on isolate scope for Angular Directive

From Dev

Angular directive check if optional binding is set in isolate scope

From Dev

" =? " in Angular Directive Isolate Scope

From Dev

What does question mark equals mean in CoffeeScript?

From Dev

What does this question mark mean in Flow: "?() => void"

From Dev

What does the question mark in "Decimal?" mean?

From Dev

XML what does that question mark mean

From Dev

What does the triple question mark mean in scala?

From Dev

What does the question mark in java mean?

From Dev

What does .php question mark = mean?

From Dev

What does the question mark in terminal command mean?

From Dev

What does the "?" (question mark) mean in javascript?

From Dev

What does this two question mark mean?

From Dev

What does the question mark in terminal command mean?

From Dev

What does hypothesis with operator with question mark mean

From Dev

What do a question mark (?) and an ampersand (&) mean in a URL?

From Dev

What does "{Binding .}" do?

From Dev

In Rails' ActiveRecord, what does a question mark at the end of a method name corresponding to a column do?

From Dev

Isolate scope in reusable angular direcives

From Dev

Isolate scope directive with optional ampersand binding in angularjs?

From Dev

Two way data binding with directive and isolate scope

From Dev

Returning a promise from isolate scope directive with `&` binding

From Dev

Angular two-way data binding isolate scope directive but property is undefined?

From Java

What does double question mark (??) operator mean in PHP

From Java

What does question mark and dot operator ?. mean in C# 6.0?

From Dev

What does "type" mean and is there is a special use for a question mark in ECMA 6?

From Dev

What does the question mark in member access mean in C#?

Related Related

  1. 1

    isolate scope angular binding not updated from geolocation

  2. 2

    What does question mark mean?

  3. 3

    Optional two-way binding on isolate scope for Angular Directive

  4. 4

    Angular directive check if optional binding is set in isolate scope

  5. 5

    " =? " in Angular Directive Isolate Scope

  6. 6

    What does question mark equals mean in CoffeeScript?

  7. 7

    What does this question mark mean in Flow: "?() => void"

  8. 8

    What does the question mark in "Decimal?" mean?

  9. 9

    XML what does that question mark mean

  10. 10

    What does the triple question mark mean in scala?

  11. 11

    What does the question mark in java mean?

  12. 12

    What does .php question mark = mean?

  13. 13

    What does the question mark in terminal command mean?

  14. 14

    What does the "?" (question mark) mean in javascript?

  15. 15

    What does this two question mark mean?

  16. 16

    What does the question mark in terminal command mean?

  17. 17

    What does hypothesis with operator with question mark mean

  18. 18

    What do a question mark (?) and an ampersand (&) mean in a URL?

  19. 19

    What does "{Binding .}" do?

  20. 20

    In Rails' ActiveRecord, what does a question mark at the end of a method name corresponding to a column do?

  21. 21

    Isolate scope in reusable angular direcives

  22. 22

    Isolate scope directive with optional ampersand binding in angularjs?

  23. 23

    Two way data binding with directive and isolate scope

  24. 24

    Returning a promise from isolate scope directive with `&` binding

  25. 25

    Angular two-way data binding isolate scope directive but property is undefined?

  26. 26

    What does double question mark (??) operator mean in PHP

  27. 27

    What does question mark and dot operator ?. mean in C# 6.0?

  28. 28

    What does "type" mean and is there is a special use for a question mark in ECMA 6?

  29. 29

    What does the question mark in member access mean in C#?

HotTag

Archive