0

I want to declare a variable and set a value in my IONIC app Template file. It's actually working like angular template. The variable may used singly or in a foreach iteration. I already got some solution but solutions are not working. I tried as following...

{{flag = true; ""}}

another is using ng-init..

<div *ngFor="let item of items" ng-init="myVariable = 'something...'">
  {{myVariable}}
  ...
</div>

So, I can not set variable and it's value in ionic template. Please give me a solution which is actually working.

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
Rashed Shaon
  • 348
  • 2
  • 4
  • 17

0 Answers0