Questions tagged [template-variables]

Template variables consist of any of various conventions for declaring, initializing, composing or evaluating variables and expressions within a template engine.

Overview

Template variables consist of any of various conventions for declaring, initializing, composing or evaluating variables and expressions with a

See also

55 questions
3
votes
2 answers

Angular, use an external template for ng-template

Let say I have a code like this in a component template :
{{user?.name}}
And this in another component template :
{{data?.datum}}
In both cases,…
Abel
  • 688
  • 6
  • 19
3
votes
3 answers

non-static template member : possible?

Is it possible to create non-static template field in a class? If no, how to workaround? Such fields should be created at compile time as needed. Example I have a lot of B-class, like B1,B2,B3. (In real case, they have more meaningful…
javaLover
  • 6,347
  • 2
  • 22
  • 67
2
votes
1 answer

Can I define new mustache template variables in swagger-codegen?

I have developed a rest-api client (in java) customised to the needs of my product. I wanted to generate tests using my rest api client using swagger-codegen modules based on yaml-file. I have already extended DefaultCodegenConfig & even tried…
palkarrohan
  • 459
  • 1
  • 4
  • 16
2
votes
2 answers

nvcc warns about a device variable being a host variable - why?

I've been reading in the CUDA Programming Guide about template functions and is something like this working? #include /* host struct */ template struct Test { T *val; int size; }; /* struct device */ template…
2
votes
0 answers

Is this method to forward declare template variable legal?

In the code bellow is listed example of forward declaration of constant template variables which compiles on both clang and gcc: template extern const T value; template const T value= 0; auto test = value; template
Oliv
  • 17,610
  • 1
  • 29
  • 72
2
votes
1 answer

Vscode snippet variable

"snippet with class binding":{ "prefix": "row.${variable}", "body":[ "", "\t", "\t\t", "\t", "
", "\t\t\t$0", "\t\t
" …
2
votes
2 answers

How to pass different template variables to one button in angular2?

There are more than two template variables in my component, just like blow:
Hal Shaw
  • 25
  • 6
2
votes
1 answer

template: only static data member templates are allowed

class value { template T value_1; float value_2; public: template void Set1(T first) { value_2 = (float)0; value_1 = first; } void Set2(float second) { value_2 = second; } …
Teytix
  • 85
  • 1
  • 4
  • 10
2
votes
1 answer

YAML reusable variables with case-specific values

Is it possible in .yml config to have dynamic properties in variables that are set depending on a particular case. For example: MY_VAR: &MY_VAR keys: key2: blahblahblah key3: blahblahblah # only apply this for section2, not…
trace
  • 361
  • 1
  • 4
  • 9
1
vote
1 answer

Variable not constexpr even though initialization condition passes static_assert

I'm trying to write some compile time string composing functionality. The following code compiles if you comment out the code section at the end. godbolt #include constexpr const char a[] = "hello "; constexpr const char b[] = "dear…
glades
  • 3,778
  • 1
  • 12
  • 34
1
vote
1 answer

MatDatePicker implementation issue: Cannot read properties of undefined (reading 'subscribe') for MatDatepickerInputBase

I'm trying to implement a mat datepicker in my project I have already tried almost all examples in angular material documentation But always get this error: core.js:6498 ERROR Error: Uncaught (in promise): TypeError: Cannot read properties of…
1
vote
1 answer

Simple tag loosing the value set after leaving a FOR tag in template

I have this simple tag defined and loaded into my template: from django import template @register.simple_tag def defining(val=None): return val The tag works! My goal is, i want to set a value for a variable using this simple tag inside the…
1
vote
0 answers

overloading template variable specialization with SFINAE

The following code: template constexpr bool is_size = false; template constexpr bool is_size> = true; template constexpr bool is_size
Oleksa
  • 635
  • 5
  • 15
1
vote
0 answers

Perform variable chaining on ad hoc filters in Grafana

I have a dashboard in which I want to use an ad hoc filter and a query variable. I am able to chain two query variables so the output of one is determined by the previous one (Example: label_values(cluster_name="$cluster_name") ). But I would like…
1
vote
0 answers

Consul-Termplate - What's the syntax for inserting variables into a "with secret" certificate call

I'm trying to download a server specific certificate and key from vault to each of my consul servers using the template function of vault-agent. The recommended approach is to set a common name and SAN as HOSTNAME.DATACENTER.DOMAIN. I am using a…