1

Can I setup WebStorm to autocomplete "Controllers.My" and "c1.test"?

    // TypeScript code    
    module Controllers
    {
        export class My
        {
            test: string;
            constructor()
            {
                this.test = "ups";
            }
        }
    }

    // html
    <div ng-controller="Controllers.My as c1">
        <input ng-model="c1.test"> {{c1.test}} 
    </div>

2 Answers 2

3

Please try WebStorm 8 RC - completion works there. See also http://blog.jetbrains.com/webstorm/2014/01/webstorm-8-eap/

Sign up to request clarification or add additional context in comments.

3 Comments

It does it indeed. Although it could not pick up new "as syntax" - underlines c1 as "Unresolved type c1" and does not give intellisense on c1 or scope properties.
please vote for WEB-11544 to be notified on any progress
Actually, as I've found out, if I register My class as an angular controller WebStorm is able to figure out the type of c1 and starts providing intellisense for {{c1.test}} property. The only thing missing is intellisense inside ng-model which I can live with.
0

Yes you can,

select this code and

Use File -> Settings -> Live Template option and

click + button in top right corner and chose 1.Live Template

you will be shown a panel there type your abbrevation field eg: "myfn" and in Template text field type the template you want

eg:

function My (){

}

and save it, now every time you type myfn and hit tab button, you will get the above template

And similarly you can add html templates , or any language supported by webstorm

1 Comment

Although useful it's not exactly what I wanted - define a new class and see it immediately in intellisense.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.