script Sprangular.constant('Env', #{ js_environment.to_json.html_safe })

- if @user
  script
    | Sprangular.startupData.User = #{serialize(@user, Sprangular::UserSerializer).html_safe}

- if @order
  script
    | Sprangular.startupData.Order = #{serialize(@order, Sprangular::OrderSerializer).html_safe}

script Sprangular.constant('Env', #{ js_environment.to_json.html_safe })

- if @user
  script
    | Sprangular.startupData.User = #{serialize(@user, Sprangular::LiteUserSerializer).html_safe}

- if @order
  script
    | Sprangular.startupData.Order = #{serialize(@order, Sprangular::OrderSerializer).html_safe}

Use lite user serializer in layout
Use lite user serializer in layout

sprangular/sprangular,sprangular/sprangular,sprangular/sprangular