Maxim Balaganskiy
Maxim Balaganskiy

Reputation: 1574

WebStorm AngularJS html autocompletion

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>

Upvotes: 1

Views: 601

Answers (2)

lena
lena

Reputation: 93728

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

Upvotes: 3

Vamsi
Vamsi

Reputation: 9780

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

Upvotes: 0

Related Questions