Hi, I'm using defunkt/jquery-pjax. but this library has bug. Then I am replacing spa library.
I read the document fully. But I can't find that feature. Would you help me?
Hi, I'm using defunkt/jquery-pjax. but this library has bug. Then I am replacing spa library.
I read the document fully. But I can't find that feature. Would you help me?
@BehindTheMath Thank you! But that method have two parameters. How do I set 'options' parameter? If only 'href' parameter set, error occurred.
Would you guide me the document or code example?
@BehindTheMath Thank you! But that method have two parameters. How do I set 'options' parameter? If only 'href' parameter set, error occurred.
Would you guide me the document or code example?
The second parameter is an options object. You can pass in pjax.options, but you will need to make sure options.requestOptions exists. For example:
if (!pjax.options.requestOptions) {
pjax.options.requestOptions = {};
}
pjax.loadUrl(href, pjax.options);
The second parameter is an options object. You can pass in `pjax.options`, but you will need to make sure `options.requestOptions` exists. For example:
if (!pjax.options.requestOptions) {
pjax.options.requestOptions = {};
}
pjax.loadUrl(href, pjax.options);
@robinnorth What do you think about falling back to this.options if the options parameter is not set, as well as setting options.requestOptions = {} in parseOptions()? This way, pjax.loadUrl(href) will just work out of the box.
@robinnorth What do you think about falling back to `this.options` if the options parameter is not set, as well as setting `options.requestOptions = {}` in `parseOptions()`? This way, `pjax.loadUrl(href)` will just work out of the box.
@BehindTheMath yes, that sounds good to me. Per my comment in #129, I think options.requestOptions should be split out into a separate property that is just handled internally by the library.
@BehindTheMath yes, that sounds good to me. Per my comment in #129, I think `options.requestOptions` should be split out into a separate property that is just handled internally by the library.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Hi, I'm using defunkt/jquery-pjax. but this library has bug. Then I am replacing spa library.
I read the document fully. But I can't find that feature. Would you help me?
You can use
pjax.loadUrl().@BehindTheMath Thank you! But that method have two parameters. How do I set 'options' parameter? If only 'href' parameter set, error occurred.
Would you guide me the document or code example?
The second parameter is an options object. You can pass in
pjax.options, but you will need to make sureoptions.requestOptionsexists. For example:@robinnorth What do you think about falling back to
this.optionsif the options parameter is not set, as well as settingoptions.requestOptions = {}inparseOptions()? This way,pjax.loadUrl(href)will just work out of the box.@BehindTheMath Thank you very much!
Related: #127
@BehindTheMath yes, that sounds good to me. Per my comment in #129, I think
options.requestOptionsshould be split out into a separate property that is just handled internally by the library.