components

Angular 2 Error ( 'directives' does not exist in type 'Component' )

故事扮演 提交于 2019-12-01 15:53:47
I am beginner in Angular 2 and I'm using the final Angular 2 release version. I have a strange problem with it. this is my databinding.component.ts code: import { Component } from '@angular/core'; import {PropertyBindingComponent} from './property-binding.component'; import {EventBindingComponent} from './event-binding.component'; @Component({ selector: 'fa-databinding', templateUrl: 'databinding.component.html', styleUrls: ['databinding.component.css'], directives: [PropertyBindingComponent, EventBindingComponent] }) and this is a peace of my app.module.ts code : import {

Angular 2 Error ( 'directives' does not exist in type 'Component' )

旧时模样 提交于 2019-12-01 14:55:46
问题 I am beginner in Angular 2 and I'm using the final Angular 2 release version. I have a strange problem with it. this is my databinding.component.ts code: import { Component } from '@angular/core'; import {PropertyBindingComponent} from './property-binding.component'; import {EventBindingComponent} from './event-binding.component'; @Component({ selector: 'fa-databinding', templateUrl: 'databinding.component.html', styleUrls: ['databinding.component.css'], directives: [PropertyBindingComponent,

Dynamically add Component in angular 2/4

时光毁灭记忆、已成空白 提交于 2019-12-01 14:12:38
How can I add component dynamically? toolbar.component.ts: @Component({ selector: 'app-toolbar', template: '<button>Add Text component</button>' }) export class ToolbarComponent { constructor() { } } section.component.ts: @Component({ selector: 'div[app-type=section]', template: '' }) export class SectionComponent { constructor() { } } text.component.ts: @Component({ selector: 'app-text', template: '<p>This is dynamically component</p>' }) export class TextComponent { constructor() { } } view.component.ts: @Component({ selector: 'app-view', template: `<div class="container"> <app-toolbar></app

Nested angular components in projects with multiple modules like JHipster

拈花ヽ惹草 提交于 2019-12-01 11:02:21
I'm trying to show an entity component in another Entity component. I found some information about shared modules online, I also checked this post but it's still not working for me. Well, it gets a little bit complicated when you have multiple modules in your project. In a project like the ones generated by JHipster there are several modules in the project. But no worries, the solution is easy: Assuming the entity component supposed to get displayed inside another component is ReviewComponent and also assuming there is a review.module for all the Review-related components, you should export

Nested angular components in projects with multiple modules like JHipster

倾然丶 夕夏残阳落幕 提交于 2019-12-01 07:44:08
问题 I'm trying to show an entity component in another Entity component. I found some information about shared modules online, I also checked this post but it's still not working for me. 回答1: Well, it gets a little bit complicated when you have multiple modules in your project. In a project like the ones generated by JHipster there are several modules in the project. But no worries, the solution is easy: Assuming the entity component supposed to get displayed inside another component is

When are setValue and setSubmittedValue called on UIComponent?

﹥>﹥吖頭↗ 提交于 2019-12-01 07:31:07
If I correctly combined the information contained in BalusC's great 2006 post http://balusc.blogspot.ch/2006/09/debug-jsf-lifecycle.html with Optimus Prime's even earlier post http://cagataycivici.wordpress.com/2005/12/28/jsf_component_s_value_local/ I get the following: My understanding: During the APPLY_REQUEST_VALUES phase, the input value is set to a submittedValue property of the UI component (e.g. inputComponent. setSubmittedValue ("test")). During the PROCESS_VALIDATIONS phase, the same values are read from the submittedValue property (presumably inputComponent. getSubmittedValue ())

WebSocket client implementations for Delphi

痞子三分冷 提交于 2019-12-01 05:51:49
Are there free WebSocket client implementations for Delphi? I found only this one: WebSockets Delphi Components but it is not free. Here is my open source library: https://github.com/andremussche/DelphiWebsockets I've added support for WebSockets to xxm . Not all handlers support the required IXxmRawSocket interface, but the Apache httpd module (xxmAHttpd) and the SCGI handler do, and I still get the best results with the standalone 'raw' handler xxmHttp. See more here . 来源: https://stackoverflow.com/questions/25181302/websocket-client-implementations-for-delphi

Angular 2 - Can't resolve all parameters for component: (?)

走远了吗. 提交于 2019-12-01 05:35:36
I started an Angular2 app and I have an issue since days ! Can't resolve all parameters for HomeComponent: (?).(…) But my issue is not about a particular provider : Everyting that I try to inject in my HomeComponent constructor return that error. No similars questions on that errors resolved my situation, and now I spent so much time looking for this that I can't find it. App.moodule.ts : import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { RouterModule } from '@angular/router'; import { SimpleNotificationsModule } from 'angular2

How to inject data into Angular2 component created from a router?

人盡茶涼 提交于 2019-12-01 05:15:15
I'm currently trying to build an Angular2 prototype (based on alpha44) of our Angular1 app (pretty complex one) and I'm trying to find the best model/data architecture when using routes and child routes. In my example, from a child component created from a route, I want to access a property of the parent component (hosting the router-outlet ). But when you create a component from a router-outlet , you cannot use @Input and @Output anymore. So what is the best practice to inject some data/properties, except basic routeParams and static routeData ? How do you communicate with the parent

How to create Ractive's subcomponents dynamically and change them programmatically

我的未来我决定 提交于 2019-12-01 05:10:01
I can instantiate (sub)components manually using tags, but I don't know how to do it dynamically, or, how to insert and remove different components in the same area using tags. Today I instantiate each (sub)component this way: Ractive.load( '/templates/global/example.html' ).then( function ( Example ) { ractive.components.example = new Example( { el : 'aside' } ); }); But the new (sub)component can't see the data of it's parent instance in mustache, only his own data. Here's a dynamic component: Ractive.components.dynamic = Ractive.extend({ template: '<component/>', components: { component: