Last active
August 29, 2020 08:38
-
-
Save elpddev/171bf253edd5d05f53a679d7054f2964 to your computer and use it in GitHub Desktop.
Movies List Component #angularjs #medium #article-hierarchical-di-ng
This file contains hidden or 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
class MoviesList { | |
static $inject = ['movies']; | |
constructor( | |
movies: MoviesService | |
) | |
} | |
const MoviesListComponent = { | |
template: ` | |
<h1>Movies</h1> | |
<ul> | |
<li ng-repeat="movie in ($ctrl.movies.movies | promiseAsync) track by movie.id"> | |
{{ movie.name }} - {{ movie.year }} - {{ movie.rating }} | |
</li> | |
</ul> | |
`, | |
controller: MoviesList | |
}; | |
moviesApp.component('moviesList', MoviesListComponent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment