I\'m writing a simple angular component. I\'m passing a parameter as a binding and display its value on the screen. All works fine: I can see the parameter being displayed on th
For those using Directives, where Components are assumed, if bindings{} is specified it appears adding those same parameters to scope{} works:
/*bindings: {
modalInstance: '<',
resolve: '<'
},*/
scope: {
modalInstance: '<',
resolve: '<'
},
*Discovered after I wrote the above that an additional scope parameter, foo, wasn't available on $scope until I assigned it from $scope.resolve. So I had to do this in $scope.init(): $scope.foo = $scope.resolve.foo. Not sure why. Guessing it has to do with my UI Bootstrap Modal + Directives usage
This may be obvious for others but wasn't for me being relatively new to AnguluarJS.
My problem was using Directives with UI-Bootstrap Modals which are compatible with Directives but designed and documented for use with Components.