Following are the steps to create snippet file for each angularjs script:
<snippet>
<content><![CDATA[
Hello, ${1:this} is a ${2:snippet}.
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<!-- <tabTrigger>hello</tabTrigger> -->
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
<content><![CDATA[
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/$1.$2.$3/angular.min.js"></script>
]]></content>
<tabTrigger>jsng</tabTrigger>
<scope>text.html</scope>
The code below represents custom auto-complete snippet for following AngularJS libraries. Create snippet files for following scripts based on above instructions.
Sublime Snippet for Inclusion of Angular.min.js
<snippet>
<content><![CDATA[
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/$1.$2.$3/angular.min.js"></script>
]]></content>
<tabTrigger>jsng</tabTrigger>
<scope>text.html</scope>
</snippet>
Sublime Snippet for Inclusion of Angular-route.min.js
<snippet>
<content><![CDATA[
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/$1.$2.$3/angular-route.min.js"></script>
]]></content>
<tabTrigger>jsngroute</tabTrigger>
<scope>text.html</scope>
</snippet>
Sublime Snippet for Inclusion of Angular-resource.min.js
<snippet>
<content><![CDATA[
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/$1.$2.$3/angular-resource.min.js"></script>
]]></content>
<tabTrigger>jsngresource</tabTrigger>
<scope>text.html</scope>
</snippet>
Feel free to suggest/comment.
[adsenseyu1]
Last updated: 2nd May, 2024 The success of machine learning models often depends on the…
When working on a machine learning project, one of the key challenges faced by data…
Last updated: 1st May, 2024 The bias-variance trade-off is a fundamental concept in machine learning…
Last updated: 1st May, 2024 As a data scientist, understanding the nuances of various cost…
Last updated: 1st May, 2024 In this post, you will learn the concepts related to…
Last updated: 26th April, 2024 In this blog post, we will discuss the logistic regression…
View Comments
It's good to know you can create your own snippets, but I prefer to use Bower to handle including 3rd party frameworks and libraries. http://bower.io/
I use Codelobster IDE for AngularJS development - http://www.codelobster.com/angularjs.html