Skip to content

Instantly share code, notes, and snippets.

@elpddev
Last active August 29, 2020 08:38
Show Gist options
  • Save elpddev/171bf253edd5d05f53a679d7054f2964 to your computer and use it in GitHub Desktop.
Save elpddev/171bf253edd5d05f53a679d7054f2964 to your computer and use it in GitHub Desktop.
Movies List Component #angularjs #medium #article-hierarchical-di-ng
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