ember.js - Find all components by name using wildcard -


is possible find ember components based on name using wildcard or regex?

so far found way find component fullname: appinstance.lookup('component:my-component')

but want achieve like: appinstance.lookup('component:my-*') return array of components name begins 'my-'

you can list names of entries using require.entries:

function getkeys(){   return object.keys(require.entries).filter(function(key){     return /.*components\/my-.*/.test(key); }; 

then can make lookup keys. (be aware function getkeys returns both component's js file names , template file names.)


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -