I am using clarity signpost, I am using this signpost for showing multiple applications, how to close this sign post when i am click on the application.
For example I am adding three buttons in this sign post, if I click on the button this need to be close. Please check my stackblitz
To keep track of whether the signpost is open or not, and then be able to dynamically close it, you should use the de-sugarized syntax of clrIfOpen to utilize two-way binding:
<ng-template [(clrIfOpen)]="signPost">
<clr-signpost-content>
<button class="btn btn-outline" (click)="close()">Hr</button>
...
</clr-signpost-content>
</ng-template>
Here is your example with this change, working fine: https://stackblitz.com/edit/signpost-dynamic-close?file=src/app/app.component.html
Related
The GeekTechesNC1601 is a 16 output controller capable of turning on or off devices based upon a URL.
I have some basic HTML code similar to this:
< button onclick="location.href='http://192.168.5.31/30000/01'" type="button">
Relay-1 On</ button>
< button onclick="location.href='http://192.168.5.31/30000/00'" type="button">
Relay-1 Off</ button>
The problem is, however, on each click on the button, it takes me to the page of the device. Not exactly what I want to do.
I need it to perform the function, but stay on the webpage I'm creating with the buttons.
Is there an easy way to do this?
Am fairly new to angular and I have an ui-select which fetches the data from remote service upon typing anything shows the related items in dropdown. It is a single select dropdown.
The problem is the input field requires two clicks to open. On first click the field gets focused and upon second click the cursor is present for typing.
Not able to get what is causing the issue.
<ui-select ng-model="page.model.form.relatedItem" theme="bootstrap">
<ui-select-match placeholder="Search ...">
<span ng-if="$select.selected.name" nbind="$select.selected.name"></span>
<span ng-if="!$select.selected.name" ng-bind="page.model.form.relatedItem.name"></span>
</ui-select-match>
<ui-select-choices refresh="page.getRelatedItemList($select.search)" refresh-delay="0" group-by="'group'" repeat="item in page.itemArray | filter: $select.search">
<span ng-bind-html="item.name | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
Thanks for any help.
This is a known issue with the ui-select library for angularJs.
The problem is related to ngAnimate and the ui-select component. If ngAnimate is removed from the app, the problem will disappear. There are also a couple of workarounds if removing ngAnimate is not an option for you.
One workaround is to add a prevent-animations directive to the ui-select elements. Simplified code example follows:
<ui-select prevent-animations>
<ui-select-match prevent-animations>{{$item.title}}</ui-select-match>
<ui-select-choices prevent-animations>
...
</ui-select-choices>
Another suggested workaround in is to use a delay to add focus to the search field after component activation. Although the github issue referenced has been marked as closed, there are other open issues citing the same problem, and unfortunately this project is is now marked as archived, so don't wait for any fixes to appear there!
I need create modal window with option, that when u open modal window, url is changing for example if u click a href with #123 in url will be after slash #123, and If I want to send someone link to modal window, he will redirect to this modal window after url. Can someone explain me how can I make it?:)
Because at this moment is that when u click some link, url does not change.
I use to modal window bootstrap 3 here is everything what I use in my project :
demo with whole code
https://codepen.io/Turqus/pen/rYeXvV
<a data-toggle="modal" href="#{{$index}}">Launch demo {{$index}}modal</a>
BTW
I also using AngularJS if it will help somehow to create this option.
I use the following service:
https://github.com/garakh/ngSilent
It allows you to change the URL and/or add parameters in the URL without calling the related route and controller. So before opening the modal window, you could use this service to add what you want to the URL.
Note that I have no connection to the developer, I have just used it in the past and it worked well for a similar problem.
There is a web site I need to scrape. I can fill in the necessary data. The problem is that I don't understand how to press the button to get the page with results.
The button has the following code:
<input type="button" value="Search!" onclick="SearchSmth();" id="btSearch">
So because the type is not 'submit' attempts to use Browser.submit() fail. I tried using something like this:
resp = b.click(type="button", id="btSearch")
but it also failed:
ClientForm.ControlNotFoundError: no control matching type 'button', kind 'clickable', id 'btSearch'
What should I do to get this button pressed?
Have you used zope.testbrowser? This is wrapper over mechanize module of python. You can use getControl browser.getControl(name='text-value') method of zope.testbrowser. You can see more examples here
I have a button image made out of divs. When I click this I want to post back and redirect.
What is the best way to do this and can it be done without using javascript?
If you want to trigger the post back from the 'div' click then you'll need to use JavaScript. See this question for further information.
Use an input element of type 'submit'...
<input type="submit" value="Submit" />
Then redirect on the server (it will vary depending on the programming language being used)