Passing array via attribute to AngularJS directive

If you’re accessing this array from your scope, i.e. loaded in a controller, you can just pass the name of the variable:

Binding array to directive variable in AngularJS

Directive:

scope:{
        title: "@",
        author: "@",
        content: "@",
        cover: "@",
        date: "@",
        tags: "="
    },

Template:

<post title="sample title" tags="arrayName" ... >

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)