Skip to content
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

HTML string inside TypeScript and JavaScript files #6778

Closed
dbaeumer opened this issue Feb 1, 2016 · 3 comments
Closed

HTML string inside TypeScript and JavaScript files #6778

dbaeumer opened this issue Feb 1, 2016 · 3 comments
Labels
Duplicate An existing issue was already created

Comments

@dbaeumer
Copy link
Member

dbaeumer commented Feb 1, 2016

Copied from microsoft/vscode#2000

When using Angular 2 and TypeScript I noticed that editing template strings of components in TypeScript files are not working as one expect. There is not autocomplete for tags and other usual HTML editing features.

For example

import {Component} from 'angular2/core';

@Component({
    selector: 'my-app',
    template: '<h1>My First Angular 2 App</h1>'
})
export class AppComponent { }

Of course it's because the type definition has declared template as a String and no part of VSCode knows that it's an HTML string.

My proposal is to define a HTMLString type where it's basically just string but helps tooling in cases like this.

If it was possible to do this, then we can define CSSString, JavaScriptString, SCSSString and so on...

@dbaeumer
Copy link
Member Author

dbaeumer commented Feb 1, 2016

What is the take of the TS team on this?

@DanielRosenwasser
Copy link
Member

See also #6508.

@mhegazy
Copy link
Contributor

mhegazy commented Feb 1, 2016

this looks like a duplicate of #4856. please see my reply in #4856 (comment). the possible change here is as @DanielRosenwasser mentioned by allowing extensibility for the typescript language service.

@mhegazy mhegazy closed this as completed Feb 1, 2016
@mhegazy mhegazy added the Duplicate An existing issue was already created label Feb 1, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants