Only on production environment the input click generates an error
See original GitHub issueEverything on development works just the way it should.
On the click event the calendar is shown and enables me to pick a date.
When serving on production mode with angular-cli, with ng serve --prod
, clicking on the input throws an error in the console that looks like the one in the attachment.
<input mdInput class="picker-input" [ngModel]="transactionForm.date | date: 'short'" required="true" [(dateTimePicker)]="transactionForm.date" placeholder="Date" dividerColor="none" readonly [theme]="'green'" [locale]="'ro'">
So here is the console error that I receive:
I can see that is something related to AOT and the fact that the dialog creation is created in a dynamic way. Please help me with some suggestions or maybe this is actually a bug. I also provided the package.json dependencies so that you can see what versions I am using. Sorry for the long issue. Hope this helps. Thanks in advance.
"dependencies": {
"@angular/common": "^2.4.6",
"@angular/compiler": "^2.4.6",
"@angular/core": "^2.4.6",
"@angular/forms": "^2.4.6",
"@angular/http": "^2.4.6",
"@angular/material": "^2.0.0-beta.2",
"@angular/platform-browser": "^2.4.6",
"@angular/platform-browser-dynamic": "^2.4.6",
"@angular/router": "^3.3.1",
"angular-oauth2-oidc": "^1.0.20",
"bootstrap": "^3.3.7",
"chart.js": "^2.5.0",
"core-js": "^2.4.1",
"font-awesome": "^4.7.0",
"hammerjs": "^2.0.8",
"jquery": "^3.1.1",
"moment": "^2.18.0",
"ng2-charts": "^1.5.0",
"ng2-cookies": "^1.0.6",
"ng2-date-time-picker": "^2.0.12",
"rxjs": "^5.0.1",
"ts-helpers": "^1.1.1",
"zone.js": "^0.7.2"
},
"devDependencies": {
"@angular/cli": "^1.0.0-rc.2",
"@angular/compiler-cli": "^2.4.6",
"@types/jasmine": "2.5.38",
"@types/node": "^6.0.64",
"codelyzer": "~2.0.0-beta.1",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "2.5.0",
"karma": "1.2.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-coverage": "^1.1.1",
"karma-firefox-launcher": "^1.0.0",
"karma-jasmine": "^1.0.2",
"karma-phantomjs-launcher": "^1.0.2",
"karma-remap-istanbul": "^0.6.0",
"phantomjs": "^2.1.7",
"phantomjs-prebuilt": "^2.1.14",
"protractor": "~4.0.13",
"ts-node": "1.2.1",
"tslint": "^4.3.0",
"typescript": "~2.0.3"
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:22 (8 by maintainers)
Top Results From Across the Web
Encountered “Minified React error” in the production ... - GitHub
The first thing to do in this case is to debug the app in order to have more details: Use minify and dev...
Read more >1-Click Publish Required Error - OutSystems 10 Documentation
The module that you are trying to run in your Personal Area changes the database and therefore the 1-Click Publish operation is required....
Read more >The 10 Most Common JavaScript Issues Developers Face
If you need help figuring out why your JavaScript isn't working, consult this list of the 10 most common JavaScript issues from a...
Read more >Syntax Error in Angular App: Unexpected token - Stack Overflow
I have an Angular app which runs perfectly in my local and production environment.. After a tiny change I made ...
Read more >Vizlib Writeback Table / Input Form - Known Issues and FAQ
Known Issues linked to errors, and FAQ related to Vizlib Writeback Table and Vizlib Input Form. TABLE OF CONTENTS. Known Issues.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@CriPstian @spy4x
Guys, I searched the problem and I found this.
Basically, because in my directive I create a module dynamically and this procedure is running in JIT. So when you run AOT, it would cause the bug. Right now angular could not run both JIT and AOT at the same time.
And now I already fixed the bug, but I haven’t published a new version. Because I still have to run some tests. Hopefully, I will published package at this weekend.
Thanks guys.
@CriPstian @spy4x
Guys, the package has been updated. Please update to the latest package.
If you find any problems, please let me know.
Thanks.