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: 15th May, 2024 Have you ever wondered how your bank decides what to…
In this fast-changing world, the ability to learn effectively is more valuable than ever. Whether…
Last updated: 13th May, 2024 Whether you are a researcher, data analyst, or data scientist,…
Last updated: 12th May, 2024 Data lakehouses are a relatively new concept in the data…
Last updated: 12th May 2024 In this blog, we get an overview of the machine…
Last updated: 12th May, 2024 In the world of generative AI models, autoencoders (AE) and…
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