This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Module): add helper method,
component(...)
for creating compon…
…ent directives Since we are promoting component directives as the building blocks of Angular applications, this new helper provides a simpler method for defining such directives. By using sensible, widely accepted, conventions the number of parameters needed has been cut down dramatically. Many component directives can now be defined by simply providing a `name`, `template`/`templateUrl`, a `controller`, and `bindings`: ```js myMod.component('myComp', { template: '<div>My name is {{myComp.name}}</div>', controller: function() { }, bindings: { name: '=' } }); ``` Closes #10007 Closes #12933
- Loading branch information
1 parent
4fc7346
commit 54e8165
Showing
2 changed files
with
224 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters