Search code examples
angularjsangularjs-directivedefaultunspecified-behavior

Default controllerAs for the Angular directive


What is the default for controllerAs for the Angular directive definition if it is not specified?


Solution

  • Unit tests describe the default behaviour of controllerAs in the directive definition object(ddo) as such:

    it('should throw noident when missing controller identifier')
    
    it('should throw noident when missing controllerAs directive property')
    

    References