Find the latest on option chains for National Grid Transco, PLC National Grid PLC (NEW) American Depositary Shares (NGG) at Nasdaq.com. Definition and Usage. The ng-options directive fills a element with . The ng-options directive uses an array to fill the dropdown list. In many cases it would be easier to use the ng-repeat directive, but you have more flexibility when using the ng-options directive. ng new my-ng-app --routing --style scss --prefix amc This command combines all my favorite options for generating a new Angular application. Generating Angular Blueprints (ng generate) the --collection Option. Most of the following commands accept the --collection option. The ngOptions attribute can be used to dynamically generate a list of elements for the element using the array or object obtained by evaluating the ngOptions comprehension expression. In many cases, ngRepeat can be used on elements instead of ngOptions to achieve a similar result. ng g appShell [ options ] Generates an app shell for running a server-side version of an app. This tells ng-options directive to loop through the array, and generate option element containing the current value. The generated html looks like this: The value of each option element is the loop couter and the text inside the option element is the current array content. The ng g component plainsight/some-name makes a new directory when we use it. The final output will be: plainsight/some-name/some-name.component.ts To avoid that, make use of the flat option ng g component plainsight/some-name --flat and it will generate the files without making a new folder . plainsight/some-name.component.ts