angularjs - Angular directive pass data to template -


i hava directive need pass data template. in understanding should able this.

return {  template: '<p>{{answers}}</p>',  restrict: 'e',  scope: {    data: '=' },  scope.answers = scope.data.answers; 

my scope.answers = ["no", "yes", "yes", "yes"]

but no data show in html. wrong approach?

in addition post of @devanshu madan, i'd share link tutorial. creating directive pass data into, , render in template section of specific directive can achieved following this tutorial.

better have @ link, proper information you'll needed background information.


Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -