angular / angular-cli

CLI tool for Angular
https://cli.angular.io
MIT License
26.76k stars 11.98k forks source link

webpack plugin & AOT:Error <img src="../../public/images/angular.png"> IMG tags into strings, images can not be accessed #3907

Closed sustwater closed 7 years ago

sustwater commented 7 years ago

OS

Windows 7,

tsconfig.json { "compilerOptions": { "target": "es5", "module": "es2015", "moduleResolution": "node", "sourceMap": true, "mapRoot": "", "emitDecoratorMetadata": true, "experimentalDecorators": true, "removeComments": false, "noImplicitAny": true, "declaration": true , "suppressImplicitAnyIndexErrors": true } }

package.json

{ "name": "ng2-quickstart", "version": "1.0.0", "description": "angular2 quickstart project", "scripts": { "serve": "http-server ./dist -a 0.0.0.0 -p 9000", "start": "webpack-dev-server --progress", "build": "rimraf dist && webpack --config config/webpack.prod.js --progress --profile --bail" }, "license": "MIT", "dependencies": { "@angular/common": "2.1.2", "@angular/compiler": "2.1.2", "@angular/core": "2.1.2", "@angular/http": "2.1.2", "@angular/platform-browser": "2.1.2", "@angular/platform-browser-dynamic": "2.1.2", "@angular/platform-server": "2.1.2", "@angular/forms": "2.1.2", "@angular/router": "3.1.2", "zone.js": "0.6.25", "rxjs": "5.0.0-beta.12", "core-js": "2.4.1" }, "devDependencies": { "@ngtools/webpack": "1.1.9", "@angular/compiler-cli": "2.1.2", "reflect-metadata": "0.1.9", "angular2-template-loader": "0.4.0", "awesome-typescript-loader": "2.2.4", "css-loader": "0.23.1", "extract-text-webpack-plugin":"2.0.0-beta.4", "file-loader": "0.8.5", "html-loader": "0.4.3", "html-webpack-plugin": "2.15.0", "jasmine-core": "2.4.1", "null-loader": "0.1.1", "raw-loader": "0.5.1", "rimraf": "2.5.2", "style-loader": "0.13.1", "ts-loader": "0.8.1", "typescript": "2.0.2", "typings": "1.3.2", "live-server": "1.1.0", "node-sass": "3.13.1", "performance-now": "0.2.0", "sass-loader": "3.2.3", "webpack": "2.1.0-beta.27", "webpack-dev-server": "1.14.1", "webpack-merge": "0.14.0" } }

main.component.ts

import { Component ,ViewContainerRef} from '@angular/core'; import '../../public/css/styles.css';

@Component({ selector: 'my-main',

styleUrls : ['./main.component.css'],

templateUrl : './main.component.html' }) export class MainComponent { constructor( public viewContainerRef:ViewContainerRef){} }

main.component.html

helloworld

RicardoVaranda commented 7 years ago

Hi @sustwater, could you please clarify a little further on what your issue is and how to reproduce it.

filipesilva commented 7 years ago

I'm sorry, I have no idea of what this issue is about. Please open a new issue using the issue template and fill in all the fields please.

angular-automatic-lock-bot[bot] commented 5 years ago

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.