nl_tokens: Collects a scenario object and templates from element
pl_tokens: function collectScenariosFromElement ( parentElement ) { var scenarios = [ ] ; var templates = [ ] ; var elements = parentElement . children ( ) ; var i = 0 ; angular . forEach ( elements , function ( el ) { var elem = angular . element ( el ) ; //if no source or no html, capture element itself if ( ! elem . attr ( 'src' ) || ! elem . attr ( 'src' ) . match ( / .html$ / ) ) { templates [ i ] = elem ; scenarios [ i ] = { media : elem . attr ( 'media' ) , templ : i } ; } else { scenarios [ i ] = { <mask> : elem . attr ( 'media' ) , src : elem . attr ( 'src' ) } ; } i ++ ; } ) ; return { scenarios : scenarios , templates : templates } ; }