Aurelia 1.x Q&A - Sandbox at https://codesandbox.io/s/aurelia-javascript-sandbox-jnl6q85zq5
dependabot[bot] on npm_and_yarn
build(deps): bump ssri from 6.0… (compare)
dependabot[bot] on npm_and_yarn
build(deps): bump ssri from 6.0… (compare)
dependabot[bot] on npm_and_yarn
chore(deps): bump ssri from 6.0… (compare)
dependabot[bot] on npm_and_yarn
build(deps): bump ssri from 6.0… (compare)
dependabot[bot] on npm_and_yarn
build(deps): bump ssri from 6.0… (compare)
requestOptions.body = /^application\/(.+\+)?json/.test(contentType.toLowerCase()) ? JSON.stringify(body) : (0, _aureliaPath.buildQueryString)(body);
is executed then requestOptions.body
doesn’t contain the property that was marked as observable. Before the above call body
does contain said property.
<template>foo</template>
function createTemplate() { const template = document.createElement("template"); template.innerText = "foo"; return template; }
$view = createTemplate()
hi! I have an if-binding for "n" tags in the view, and the condition values are kept in a map (computedFrom). I'm having some issues accessing the items in the map inside the view, which I thought would be straightforward, like this if.bind="isThisItemVisible.get(itemId)". Nothing is returned. I know it's passed to the view, because I can get the size to display, just not the content. Is this as expected?
Found out that map.has() works in the if-bind. The problem was that the data was never updated, due to the how a collection is not observed. I seem to have resolved it using the BindingSignaler
Good day,Please i am trying to loop through an array of objects in aurelia.but I am getting value for 'xxx' is non-repeatable.this is what my component looks like:
@inject(ApplicantService)
export class Applicants{
friends: any[];
message: string;
allApplicants: IApplicant[] = [];
constructor(private applicantService: ApplicantService) {
this.message = "all applicants.";
applicantService.getData().then(data => {
this.allApplicants = data.response;
console.log(this.allApplicants)
});
}
/this is the array passed to
allApplicants = [{"id":1,"name":"Quadri","familyName":"Ajagbe"},{"id":3,"name":"Ibrahim","familyName":"oyeneye"}]
/
}
and my view:
<tbody>
<tr repeat.for="applicant of allApplicants">
<th scope="row">1</th>
<td>${applicant.name}</td>
<td>${applicant.familyName}</td>
<td>${applicant.address}</td>
<td>Nigeria</td>
<td>q.ajagbe@gmail.com</td>
<td>27</td>
<td>true</td>
<td>
<button type="button" class="btn btn-primary">view</button>
<button type="button" class="btn btn-success">edit</button>
<button type="button" class="btn btn-danger">delete</button>
</td>
</tr>
</tbody>
Good day,Please i am trying to loop through an array of objects in aurelia.but I am getting th error: value for 'xxx' is non-repeatable. this is what my component looks like:
`@inject(ApplicantService)
export class Applicants{
friends: any[];
message: string;
allApplicants: IApplicant[] = [];
constructor(private applicantService: ApplicantService) {
this.message = "all applicants.";
applicantService.getData().then(data => {
this.allApplicants = data.response;
console.log(this.allApplicants)
});
}`
this is the array of objects passed to this.allApplicants:
// allApplicants = [{"id":1,"name":"Quadri","familyName":"Ajagbe"},{"id":3,"name":"Ibrahim","familyName":"oyeneye"}]
and my view looks like this:
`<tbody>
<tr repeat.for="applicant of allApplicants">
<th scope="row">1</th>
<td>${applicant.name}</td>
<td>${applicant.familyName}</td>
<td>${applicant.address}</td>
<td>Nigeria</td>
<td>q.ajagbe@gmail.com</td>
<td>27</td>
<td>true</td>
<td>
<button type="button" class="btn btn-primary">view</button>
<button type="button" class="btn btn-success">edit</button>
<button type="button" class="btn btn-danger">delete</button>
</td>
</tr>
</tbody>`
please help!!!
for anyone having this issue I posted above, I resolved it by wrapping the response from the api in a JSON.PARSE
so my componet looks like this `
@inject(ApplicantService)
export class Applicants{
friends: any[];
message: string;
allApplicants: IApplicant[] = [];
constructor(private applicantService: ApplicantService) {
this.message = "all applicants.";
applicantService.getData()
.then(data => {
this.allApplicants = JSON.parse(data.response);
console.log(this.allApplicants)
});
}
}`
Hello everyone!
Could you help me on how can I generate new components using AU2 cli?
Because I am having this error:
https://privatebin.net/?141c4fccddbb2a19#BYNqy37wFL2CBuo8ftaQMPdXdbftYfEWQoWSGqpJ73Yz
canLoad
of my AuthHandler runs and all seems well with the auth part of it. However, ever since updating, I don't seem to receive my query parameters in the load(params)
of my pages that implement IRouteViewModel
; the params object stays empty. Any suggestions on what I could be doing wrong in this regard?