-
Notifications
You must be signed in to change notification settings - Fork 12k
ng build --prod causes Template Parse Error #1705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is a problem that first appeared in the angular/angular issue tracker a few hours after RC5 came out. There is a workaround already in master of both angular and angular-cli. If you use the current master angular-cli (use npm link, see README "Development Hints") it will work for you already, you don't have to wait for the next CLI version to be published. |
Many thanks Kyle. that's great. I'm glad to know it's an existing problem. I'll have a read and try to get this fixed. Thanks again JT |
@kylecordes do you have the link to that issue? :) |
@kylecordes thanks! 👍 |
Thanks @kylecordes for the spot on answer. Fixed by #1662 on the CLI. |
If you only get these error in --prod mode, but not in dev, what are the implications, if any, in deploying an angular six application to a production server ? |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I am new to angular and I have built a small application that needs to display a sortable table. It all runs fine in Angular-cli development server in development mode (using
ng serve
).I've tried implementing the table with both the
<ng2-table>
and<angular-table>
libraries so I suspect this is not a problem associated with either one of these libraries.However when I build the application using
ng build --prod
for deployment onto my staging server I receive the following error inside the browser console when I try to access the applicationIt seems that the bundling is not including the
<ng2-table>
and<angular-table>
libraries within the build. This is either my SNAFU or a proI've updated my code so that it is all running using Angular 2.0.0RC5. That is, so that it uses the new @NgModule decorator.
Any help or advice you can offer would be much appreciated. I'm at an end here.
Many thanks
JT
Note: I tried temporarily specifiying the DataTableDirectives as a directive under the component's @component decorator but this didn't help.
1. OS
Mac OSX El Capitan?
2. Versions.
Angular RC5
angular-cli: 1.0.0-beta.10
node: 6.3.1
3. Repro steps.
The app was originally created using the CLI tool.
Full code is available here: https://github.com/paistipoikka/GH_DTS
4. The log given by the failure.
zone.js:461 Unhandled Promise rejection: Template parse errors:
Can't bind to 'rowsOnPageSet' since it isn't a known property of 'mfBootstrapPaginator'. ("
<mfBootstrapPaginator [ERROR ->][rowsOnPageSet]="[10,25,100]">
"): a@42:62 ; Zone: ; Task: Promise.then ; Value:
Template parse errors:↵Can't bind to 'rowsOnPageSet' since it isn't a known property of 'mfBootstrapPaginator'. (" ↵ <mfBootstrapPaginator [ERROR ->][rowsOnPageSet]="[10,25,100]">↵ ↵ "): a@42:62"
The text was updated successfully, but these errors were encountered: