Can't get key - angularfire2 - angularfire2

Hello I am using angularfire2 + firebase into my ionic3 app, I am tryng to get key (for example: C0u7DXjuejQjfCBHBnwL9xK3TCi1) but can't
not working:
<li *ngFor="let client of clients | async">
{{client.key}}
</li>
I tired also client.$key but not working..
but I am getting values good. for example:
<li *ngFor="let client of clients | async">
{{client.name}}
</li>

Related

Xpath, how to get access to inner elements?

<div class="vehicle-item__main-content">
<div class=class="vehicle-item_summary-container">
<ul class="vehicle-item__attributes">
<li class="vehicle-item__attribute-item">
<i class="icon icon-specs-transmission-gray"></i>
"Manual"
</li>
<li class="vehicle-item__attribute-item">
<i class="icon icon-specs-passenger-gray">
"4 People"
</li>
I have a webscraper andI would like to catch the following texts, 'Manual' and '4 People'. The website has many more class="vehicle-item__attribute-item" which I dont need. How can I get access to the text ? Maybe by using the help of the i class (class="icon icon-specs-transmission-gray")
transmission = driver.find_elements_by_xpath('//li[#class="vehicle-item__attribute-item"]')
transmissionlist = []
for trans in transmission:
print(trans.text)
transmissionlist.append(trans.text)
With this I am getting all 100+ items from the website, but I only need the above 2 car properties.
Instead of
'//li[#class="vehicle-item__attribute-item"]'
try
'//li[i[contains(#class, "icon-specs-transmission-gray")]]'
'//li[i[contains(#class, "icon-specs-passenger-gray")]]'
transmission = driver.find_element_by_xpath('//li[i[contains(#class, "icon-specs-transmission-gray")]]').text
passengers = driver.find_element_by_xpath('//li[i[contains(#class, "icon-specs-passenger-gray")]]').text

After parsing a valid expression, there is still more data in the expression pageCount

I'm making an E-commerce website and in the products section (inside admin), I was trying to display only 10 products per page. I'm new to Spring and while writing the code, I encountered an error (given in title) when trying to add the next page button. However, the code works fine with the Previous button and all the page numbers. Here's my code for the pagnation section:
<nav class="mt-3" th:if="${count > perPage}">
<ul class="pagination">
<li class="page-item" th:if="${page > 0}">
<a th:href="#{${#httpServletRequest.requestURI}} + '?page=__${page-1}__'" class="page-link">Previous</a>
</li>
<li class="page-item" th:each="number: ${#numbers.sequence(0, pageCount-1)}" th:classappend="${page==number} ? 'active' : ''">
<a th:href="#{${#httpServletRequest.requestURI}} + '?page=__${number}__'" class="page-link" th:text="${number+1}"></a>
</li>
<li class="page-item" th:if="${page pageCount-1}">
<a th:href="#{${#httpServletRequest.requestURI}} + '?page=__${page+1}__'" class="page-link">Next</a>
</li>
</ul>
</nav>
The first 2 li's work fine and I get the list of pages and also the previous button. But on adding the Next button, I get the error mentioned above.
First of all, please always provide the actual error message. Otherwise we are just guessing.
My guess is that th:if expects a boolean expression and what you have doesn't look like boolean to me: th:if="${page pageCount-1}"
Change that to something like page == pageCount-1, but again depends on what you want to display there

Laravel Route request

I have make the notifications. but Notifications send perfectly.When I click notification not gone to the Notification for more details.
Route issue
<a href="{{URL::to("surveys/59")}}">
<li class="list-group-item notifictionhover">
<strong>{{$notification["data"]["fromuser"]["name"]}}</strong>
Commented On Survey <strong>{{$notification["data"]["survey"]["title"]}}</strong>
<strong>{{$notification["data"]["comment"]["text"]}}</strong>
<div>{{$notification["created_at"]}}</div>
</li>
</a>
My Web.php Route define
Route::resource("surveys","SurveyController");

Laravel: request::is() and request::patch()

Can somebody explain me difeerence between
Request::is()
and
Request::patch()
??
I used request::is in my code to active navbar like this, but i saw that somebody use too request::patch
<div class="nav-collapse">
<ul class="nav">
<li class="{{ Request::is('/') ? 'active' : ''}}"><a href="/">#
</a</li>
#foreach($categories as $category)
<li class="{{ Request::is($category->name) ? 'active' : '' }}">
{{$category->name}}</li>
#endforeach
</ul>
</div>
In Side patch Request :
patch request says . only send the data which one you want to update
and it won't effecting or changing other data . so no need to send all
value again . just i want to update my first name so i need to send
only first name to update .
In Side Is Request :
https://indigotree.co.uk/laravel-4-using-request-is-named-routes/
Laravel 4.1 Request::is for active menu not working
Example
<li
{{{ (Request::is('/core') ? 'class=active' : '') }}}>Control Panel
</li>
and Check 'class="active"' to 'class=active'
This working fine for <li> tag but not <a> tag, needs to be used like so:
Overview

Cannot read property of undefinded

I am working with Vue and Laravel 5.4.
I have a single post object with a user object inside.
When trying to get any data from that user object inside the post object I get "Cannot read propery of underfinded" even though the data shows fine on the page.
Here is my post object:
Here where I am calling it:
<div class="pull-left">
<a href="#">
<img class="media-object avatar" :src="singlePost.user.photo_url" alt="img" />
</a>
Its on in a .vue file and everything renders just fine on the page.
I have a user prop that is passed that is the current user of the app.
Any ideas?
You probably just need to add null check like this:
<div class="pull-left">
<a href="#">
<img class="media-object avatar" :src="singlePost && singlePost.user.photo_url" alt="img" />
</a>

Resources