add checking for nullable
add angular api and javascripts