I am working on Angular JS 1.x (I know the FW is outdated:)) where in I noted the following convention to be used much in component configuration.
require: {
componentContoller1: '^componentContoller1',
},
I understand that we asking angular to get componentContoller1's controller instantiated and bind it to a property in current component, but I also noticed following convention like
require: {
componentContoller1: '?^^componentContoller1',
},
Can someone tell me what is the difference here using ?^^
, I tried google and angular doc but could not get a clarity. Any help great and thanks.
Complete configuration or set up will be like
angular.module('moduleName').component('componentName',{
templateUrl: "path to template",
require: {
componentContoller1: '?^^componentContoller1',
},
controller(){ //code }
})
From the official documentation ( https://docs.angularjs.org/api/ng/service/$compile#-require- )
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.