a8m / a8m/angular-filter

How to dynamically insert items from a Array for the filter

Ouverte
#100 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
2.9k
Forks
319
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

How do I insert dynamically items from this array to the filter that is in wizard.html page , for when the templateUrl , which is on the route , make the call can be rendered in wizard.html page.
Controller

``` javascript
angular.module('tareasApp')
.controller('NatureCtrl', function ($scope, $routeParams) {
$scope.items =[
{
href:'/sound-waves',
img:'waves.jpg',
video:'//www.youtube.com/watch?v=OG2eGVt6v2o',
description:'Those Relaxing Sounds of Waves'
},
{
href:'/nature-relaxing-sound',
img:'ocean.jpg',
video:'//www.youtube.com/watch?v=SWR0GdC7_40',
description:'Nature Sounds Relaxing Ocean Sounds'
}
];
});
```

Page wizard.html

``` javascript


{{item.description}}




```

Route

``` javascript
angular.module('tareasApp')
.config(function ($routeProvider, $locationProvider) {
$locationProvider.html5Mode(true);
$routeProvider

.when("/:pageName", {
templateUrl: "views/wizard.html",
controller: "PranksCtrl"
})
.otherwise({
redirectTo: '/'
});
});
```

The goal is to avoid having multiple pages with the same structure.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.