169
rated 0 times
[
174]
[
5]
/ answers: 1 / hits: 84560
/ 10 Years ago, wed, may 28, 2014, 12:00:00
So I'm wondering how I can declare multiple values within a single ng-init, without having to create some weird hash, that then I need to always access specifically.
so basically I would like
<div ng-init=a = 1, b = 2>{{a}}</div>
and I'm saying that I would like to avoid having to do
<div ng-init=unecessary_bs = {a: 1, b: 2}>{{unecessary_bs.a}}</div>
However the reasonable :
<div ng-init=a = 1, b = 2>{{a}}</div>
doesn't seem to work.
Anticipated Thanks
More From » angularjs