-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AngularJS support #1
Comments
Maybe you can help summarize the keywords. AngularJS is very different from other libraries. |
I'll give it a go. But there's of course the global
And then theres the angular.module object with its methods and properties:
And there's the services, which are injected into functions kind of like so: function AppController($scope, $http) {
$http.get('http://example.com/api/test.json', function(response) {
/* ... */
});
} These are the built-in services:
The $rootScope/$scope directives above have got the following methods and properties as well:
Likewise, the $cookieStore has got the following methods:
$http has these:
I'm sure I've forgot a bunch of things, but at least it's a beginning... |
Hi @Renstrom This is very helpful. I have two questions about AngularJS need to solve before I can work:
|
Yeah, basically the second approach is what you do, i.e. var cModule = angular.module(/* some args*/); // constructor
cModule.name(); Although, some people like to chain them like this:
But I guess you can think of them kind of like that, the concept is called "dependency injection" and is one of the main (if not the) feature of AngularJS. I'm not sure how to explain it but here's some info about it on Angular's homepage: |
Thanks, I have learned a new stuff about DI. But I will treat them as global objects. It's hard to tell are they angular service or not. |
Basic support is pushed. TODO: |
Add support ng-* attributes in html |
http://docs.angularjs.org/api/
Unfortunately, I'm not very familiar with making syntax files for Vim.
The text was updated successfully, but these errors were encountered: