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
Post a Comment