JSFiddle - React, Tailwind, and code Playground

by Luiza CICONE

HTML

<div ng-controller="MyCtrl as ctrl">

  <names on-refresh-names='ctrl.reloadNames'></names>

</div>

JavaScript

var app = angular.module('myApp', []);

app.controller('MyCtrl', ['$scope', function($scope) {
  this.reloadNames = function() {
    console.log('refresh');
  }
}]);

app.component('names', {
  templateUrl: '<input ng-model="searchNameValue"><button ng-click="onRefreshNames()">Click</button>',
  controller: function() {
  },
  bindings: {
    onRefreshNames: '&'
  }
});