new structure to support modal based on template with $scope
Merge remote-tracking branch 'origin/master'