Skip to content

Conversation

@zjffdu
Copy link
Contributor

@zjffdu zjffdu commented May 3, 2017

What is this PR for?

ng-change can not capture event, so that means $event.timeStamp is undefined. angular/angular.js#6370
This cause AngularElem's onChange is only invoked once. This PR use another approach to update the angularObject.

What type of PR is it?

[Bug Fix]

Todos

  • - Task

What is the Jira issue?

How should this be tested?

Tested manually

Screenshots (if appropriate)

Before
zeppelin_before
After
zeppelin_after

Questions:

  • Does the licenses files need update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

@zjffdu
Copy link
Contributor Author

zjffdu commented May 3, 2017

@Leemoonsoo Please help review.

Text(s"${functionName}=$$event.timeStamp"),
Null)
Text(s"${functionName}=${functionName} + 1"),
Null) % Attribute(None, "ng-init", Text(s"${functionName} = 0"), Null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like initializing value using ng-init calls callback function once, before the actual event.
I think the ${functionName} need to be initialized in the following line

val angularObject = addAngularObject(functionName, 1)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, PR is updated.

@Leemoonsoo
Copy link
Member

LGTM

@zjffdu
Copy link
Contributor Author

zjffdu commented May 4, 2017

Thanks, will merge if no more comments.

@asfgit asfgit closed this in 92e3abc May 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants