JavaScript Concatenate i18next and Jade variable

I want to output "You are logged in as [Username]" using i18next for the text and a Jade variable as the actual username, but I can't seem to get them working together.

As far as i can tell, i18n overwrites the WHOLE <p> to show "You are logged in as". The username is only shown, if I put it in a separate <p>, like so:

if (user)
  p(data-i18n='markup.loggedInAs')
  p #{user.username}

But then, of course, it gets rendered as a separate <p>, which is not what I want. I want both of them on a single line, ideally inside the same <p>. Is there a trick?

This:

if (user)
  p(data-i18n='markup.loggedInAs')
    | #{user.username}

doesn't work. The username is not shown at all :/

Thanks for your help.

Answer:1

The following code passes an argument variable nextId to the IndexedDB Store get method and the corresponding records are returned if the argument passed matches the key of the record. Initially I ...

The following code passes an argument variable nextId to the IndexedDB Store get method and the corresponding records are returned if the argument passed matches the key of the record. Initially I ...

I'm quite new to javascript and can't find the solution. I have the following code. <form class="edit-task-form"> <legend>Create Task</legend> <label>Task</...

I'm quite new to javascript and can't find the solution. I have the following code. <form class="edit-task-form"> <legend>Create Task</legend> <label>Task</...

Any help converting Excel "power of" function to JavaScript? Values are: A1 = 99% A2 = 45 formula is = (A1^A2)*100 results rounded to whole number is 64.

Any help converting Excel "power of" function to JavaScript? Values are: A1 = 99% A2 = 45 formula is = (A1^A2)*100 results rounded to whole number is 64.

  1. excel power of 2
  2. excel power of 10
  3. excel power of e
  4. excel power of 3
  5. excel power of symbol
  6. excel power of 2 formula
  7. excel power of function
  8. excel power of number
  9. excel power of two
  10. excel power of 4
  11. excel power of n
  12. excel power of negative number
  13. excel power of 2 symbol
  14. excel power of
  15. excel power of matrix
  16. excel power of calculation
  17. excel of power bi
  18. excel axis power of 10
  19. excel formula power of x
  20. excel formula power of n

I'm trying to scroll the page down when I click a button with an animation to a certain distance, currently, I'm able to scroll down to a certain element but this is not what I want, I want to scroll ...

I'm trying to scroll the page down when I click a button with an animation to a certain distance, currently, I'm able to scroll down to a certain element but this is not what I want, I want to scroll ...

  1. can't scroll down on certain websites