Closed gkatsanos closed 10 years ago
It looks like you might want to have two snippets and you can save these in your Packages/User folder as some-name.sublime-snippet
.
Below are some examples:
This is triggered via ui-config-state
<snippet>
<content><![CDATA[
config(function(\$stateProvider) {
\$stateProvider
.state('$1', {
url: "$2",
views: {
"$3": { template: "$1.$3" },
"$4": { template: "$1.$4" }
}
})$5
});
]]></content>
<tabTrigger>ui-config-state</tabTrigger>
<scope>source.js</scope>
<description>Angular.js ui-router config</description>
</snippet>
This is triggered via ui-state
<snippet>
<content><![CDATA[
.state('$1', {
url: "$2",
views: {
"$3": { template: "$1.$3" },
"$4": { template: "$1.$4" }
}
})$5
]]></content>
<tabTrigger>ui-state</tabTrigger>
<scope>source.js</scope>
<description>Angular.js ui-router state</description>
</snippet>
That's awesome, I was trying to make an "autocomplete" instead... Thanks a million.
I am using ui-router and I'd like to write a snippet for it's config syntax.. https://github.com/angular-ui/ui-router