Fixed the scope problem with angular.