Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
<button ng-show="color.show" ng-click="addNewColor(color);color.show=false;">Add this color to mine collection</button>
このコードがあり、そのボタンをクリックしてもボタンが消えません。別の場所に移動してそのテンプレートに戻ると(angularUIルーターを使用しています)、そのボタンが消えます。color.show 定義変数は true です。
おそらく、次の式にjs エラーがあります。
addNewColor(color);
このフィドルの例を見て、 js エラーがなければすべてが正しく機能することを確認してください。