Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- angular.module('timesheet')
- .directive('weekEntry', function () {
- function onUpdate(newData) {
- if (!newData[0] || !newData[1]) {
- return;
- }
- var component = WeekEntryComponent({
- rows: newData[1].companies,
- clients: newData[0],
- saveMethod: scope.saveTimesheet
- });
- React.renderComponent(component, element.find('#weekEntry')[0]);
- }
- return {
- restrict: 'A',
- link: function (scope, element) {
- scope.$watchCollection('[clients, model]', onUpdate);
- }
- };
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement