PS typo
<div ng-init="z.angularBind('params',getLocationParams,'ourParagraphId')
"></div>
<div ng-init="z.angularBind('params',getLocationParams(),'ourParagraphId')
"></div>

On Wed, Jul 13, 2016 at 9:03 PM TEJA SRIVASTAV <[email protected]>
wrote:

> We do have work around for that but Validate.
> You need to use angularBinding to achieve it
> %angular
> <script>
> var
> scope=angular.element(document.getElementById("main")).scope().$root.compiledScope;
> scope.getLocationParams = function(){
> var pairs = window.location.search.substring(1).split("&"),
>     obj = {},
>
>     pair,
>     i;
>
>   for ( i in pairs ) {
>     if ( pairs[i] === "" ) continue;
>
>     pair = pairs[i].split("=");
>     obj[ decodeURIComponent( pair[0] ) ] = decodeURIComponent( pair[1] );
>   }
>
>   return obj;
>
> </script>
> <div ng-init="z.angularBind('params',getLocationParams,'ourParagraphId')
> "></div>
>
> On Wed, Jul 13, 2016 at 3:02 PM Rajesh Balamohan <
> [email protected]> wrote:
>
>> +1 on this.  I am not sure if this is possible. If so, it would be really
>> helpful.
>>
>> ~Rajesh.B
>>
>> On Fri, Jul 8, 2016 at 11:33 PM, on <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> I am trying to pass parameters via URL to a published paragraph (and to
>>> run it after that), e.g., I would like to get variable test of
>>> /paragraph/20160708-144835_1515469620?asIframe&test=123 within my python
>>> context, calculating a bit and then printing the result in the paragraph
>>> (so that it appears on the website).
>>>
>>> Is this even possible?
>>>
>>> Thanks and best regards,
>>> ON
>>>
>>
>>
>>
>> --
>> ~Rajesh.B
>>
>

Reply via email to