Comments (2)
I'm having a problem trying to reproduce this on my machine. The sample code doesn't compile because of a missing comma after selector: 'pim'
. After fixing that, Angular complains about the unknown property formGroup
in the inline template.
This is what I did: first I set up an Angular 9 project from the command line.
npm i -g @angular/cli
ng new test --interactive=false
cd test
npm i polytype
ng generate component pim --inline-template
Then I edited src/app/pim/pim.component.ts ending up with this code:
import { Component } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { classes } from 'polytype';
export class AbstractBaseComponent{
form: FormGroup
}
@Component ({
selector: 'pim',
template: `
<form [formGroup] = 'form'>
</form>
`
})
export class PimComponent extends classes(AbstractBaseComponent) {
// the form of the template is NOT referenced by the form of the AbstractBaseComponent as expected
}
When I run ng build
, this is what I'm getting:
ERROR in src/app/pim/pim.component.ts:13:8 - error NG8002: Can't bind to 'formGroup' since it isn't a known property of 'form'.
13 <form [formGroup] = 'form'>
~~~~~~~~~~~~~~~~~~~~
This is obviously not related to Polytype.
And in fact, replacing classes(AbstractBaseComponent)
with AbstractBaseComponent
doesn't make a difference.
It would be helpful if you could post a reproducible example, so I can check why the code in your first snippet is not producing the same error I'm getting here in the first place.
from polytype.
Closing as not reproducible. Feel free to open a new issue if you think the problem still needs to be investigated.
from polytype.
Related Issues (14)
- explicit classes export HOT 2
- Bind methods problem HOT 5
- Abstract Class Support HOT 2
- Documentation update
- Comparing polytype with other methods
- Using generic in baseclass HOT 17
- Improving typing for getPrototypeListOf HOT 1
- Method override does not work correctly with "crocks" library HOT 2
- Issue with Angular module HOT 3
- Issue with Angular 8 in prod mode HOT 3
- Issue with ngOnDestry method when use polytype HOT 2
- empty catch block - not accepted by some linters HOT 2
- core.js:4117 ERROR TypeError: Constructor cannot be invoked without 'new' HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polytype.