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]
Artificial Intelligence (AI) agents have started becoming an integral part of our lives. Imagine asking…
In the ever-evolving landscape of agentic AI workflows and applications, understanding and leveraging design patterns…
In this blog, I aim to provide a comprehensive list of valuable resources for learning…
Have you ever wondered how systems determine whether to grant or deny access, and how…
What revolutionary technologies and industries will define the future of business in 2025? As we…
For data scientists and machine learning researchers, 2024 has been a landmark year in AI…
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