components

Get data from angular 2 pipe

妖精的绣舞 提交于 2019-12-22 01:16:19
问题 Is it possible to get filetered data from pipe to component? If our data filtered by pipes in template, How I can grab this filtered data and pass it into my component ? :) Many thanks for any help. 回答1: I don't know if it's a good think and what is your exact use case but you can inject the component instance (or a shared service) into the pipe constructor. Then you can set value on it: @Pipe({ name: 'test' }) export class TestPipe { constructor(@Inject(forwardRef(() => AppComponent))

What is the best way to implement declarative collection rendering with Polymer?

随声附和 提交于 2019-12-22 01:15:34
问题 I would like to be able to render a remote collection fetched with <core-ajax> as such: <rendered-collection url="/api/items"> <custom-element value="{{ _it_ }}"></custom-element> </rendered-collection> where <rendered-collection> would look something like: <link rel="import" href="/core-ajax/core-ajax.html"> <polymer-element name="rendered-collection" attributes="url" noscript> <template> <core-ajax url="{{ url }}" response="{{ collection }}" auto handleAs="json"></core-ajax> <template

Flux with Alt - Simultaneous dispatches means wrong design pattern?

一笑奈何 提交于 2019-12-22 00:02:30
问题 I build an app with pure React. Its primary page shows multiple movies (user added). Users can vote and comment on every movie listed. I have a MovieCard component, which is responsible for a single movie. Then in Home I render an array of MovieCard components. Next I decided to implement a call to foreign movie database API, to get relevant movie information. It worked fine. Then I decided to refactor it in Flux pattern, using Alt and following the guidelines of this tutorial. Everything

How can a JSF/ICEfaces component's parameters be updated immediately?

余生长醉 提交于 2019-12-21 23:37:42
问题 I have an ICEfaces web app which contains a component with a property linked to a backing bean variable. In theory, variable value is programmatically modified, and the component sees the change and updates its appearance/properties accordingly. However, it seems that the change in variable isn't "noticed" by the component until the end of the JSF cycle (which, from my basic understanding, is the render response phase). The problem is, I have a long file-copy operation to perform, and I would

Error when trying to use a service in dynamically created component angular 5.1

不羁的心 提交于 2019-12-21 21:53:59
问题 When trying to use a service in dynamically created component We got this error at run time ERROR Error: Can't resolve all parameters for class_1: (?). at syntaxError (compiler.js:485) at CompileMetadataResolver._getDependenciesMetadata (compiler.js:15664) at CompileMetadataResolver._getTypeMetadata (compiler.js:15499) at CompileMetadataResolver.getNonNormalizedDirectiveMetadata (compiler.js:15007) at CompileMetadataResolver.loadDirectiveMetadata (compiler.js:14862) at eval (compiler.js:34233

Delphi Custom popup/dropdown, how?

拥有回忆 提交于 2019-12-21 20:58:03
问题 I want to make a custom dropdow/popup menu with a shadow nicely beneath it. The problem is that it is not a standard menu and I need to put some components on the popup/dropdown. So basically I want a dropdown I can do whatever I want with, not being limited to simple menuitems. I want it to act like a normal popupmenu problem is where do I start. Any solutions? References? 回答1: It sounds like you want a form that looks like a popup menu, but contains components. It is easier if you have a

Under ExtJS 4 is there a way to load external components?

馋奶兔 提交于 2019-12-21 18:44:11
问题 I am trying to set up my ExtJS 4 project so I have three top level applications, for example, /foo/app.js /bar/app.js /baz/app.js Each 'top level' application is a separate ExtJS application, each with their own loaders. There are some cases were I will have general components that I want to share between all three applications, so I have /components top level directory. If I have a component name say ComponentA, /components/componenta.js How would I go about getting ComponentA into all three

android permission - CHANGE_COMPONENT_ENABLED_STATE

给你一囗甜甜゛ 提交于 2019-12-21 18:34:13
问题 i need to use android.permission.CHANGE_COMPONENT_ENABLED_STATE permission in my code because i need to update the component of another apk of my project, but it don't seems really work for me here is my code : <permission android:name="android.permission.CHANGE_COMPONENT_ENABLED_STATE" android:protectionLevel="signatureOrSystem"/> final int permission = ctx.checkCallingPermission(android.Manifest.permission.CHANGE_COMPONENT_ENABLED_STATE); final boolean allowedByPermission = (permission ==

Array of a custom class as a property

萝らか妹 提交于 2019-12-21 12:45:06
问题 I am trying to use an array of a custom class as a property for my component, but the problem is that the values are not been saved to the component, that means that if I set the values, save everything and open again the project, the values for the component disappears... My code looks like the following: unit Unit1; interface uses Windows, ExtCtrls,Classes,Controls; type TMyClass=class(TPersistent) private FName: string; FValue: double; public property Name: string read FName write FName;

gcloud component update fails

情到浓时终转凉″ 提交于 2019-12-21 07:27:33
问题 I've deployed to VM's running Debian on GCE and have cron scripts that use gcloud commands. I noticed that gcloud components update retuns this error ERROR: (gcloud.components.update) The component manager is disabled for this installation My mac works fine to update gcloud and add new components. The built in gcloud tools that were in the VM image won't update. I have not found out how to enable the component manager. 回答1: UPDATED Now you can use sudo apt-get install google-cloud-sdk command