Not able to reproduce simple (older) code with latest angular-cli
See original GitHub issueHello together!
Following problem: I’m not able to reproduce this plunkr: http://embed.plnkr.co/Ua7aZsQd3Gf74oXfXigq/preview
My version can be accessed on: https://drive.google.com/open?id=1wAjf9Px3GA71jw7pKAa5FYbX9JaNTmci, but I have stripped off angular-module directory in order to get reasonably file size.
Versions
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 1.6.8
Node: 8.9.4
OS: win32 x64
Angular: 5.2.4
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 1.6.8
@angular-devkit/build-optimizer: 0.0.42
@angular-devkit/core: 0.0.29
@angular-devkit/schematics: 0.0.52
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.8
@schematics/angular: 0.1.17
typescript: 2.5.3
webpack: 3.10.0
Repro steps
- ng new angular-modal-form
- Download project from http://embed.plnkr.co/Ua7aZsQd3Gf74oXfXigq/preview
- Unpack zip-File to src and modify in scripts and ng-app all “modalApp” --> “App”
Now we get:
index.html:1 Refused to apply style from ‘http://localhost:3456/style.css’ because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled. index.html:12 GET http://localhost:3456/angular-modal-form.js net::ERR_ABORTED index.html:13 GET http://localhost:3456/script.js net::ERR_ABORTED index.html:1 Refused to apply style from ‘http://localhost:3456/style.css’ because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled. index.html:12 GET http://localhost:3456/angular-modal-form.js net::ERR_ABORTED index.html:13 GET http://localhost:3456/script.js 404 (Not Found) core.js:3683 Angular is running in the development mode. Call enableProdMode() to enable the production mode.
So, outcommeted lines
<script src="angular-modal-form.js"></script> <script src="script.js"></script>and add scripts to .angular-cli.json like: … “scripts”: [ “angular-modal-form.js”, “script.js” ], …
(I have also tried “./…”)
we get only:
Refused to apply style from ‘http://localhost:3456/style.css’ because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled. core.js:3683 Angular is running in the development mode. Call enableProdMode() to enable the production mode. The last error is not dramatically, because style.css contains nothing important.
Observed behavior
Click on buttons does not results in opening modal dialog like on http://embed.plnkr.co/Ua7aZsQd3Gf74oXfXigq/preview
Desired behavior
Modal dialogs should pop-up.
Many thanks for your help!
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Including external script files in a build is part of the wiki, you can find that information here: https://github.com/angular/angular-cli/wiki/stories-global-scripts
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.