This assumes you already created an app and installed dnn-sxc-angular

Create Demo Data and Enable Permissions to Read

  1. Create a content type named Person which we will access later from our angular app. Add a string field Name and create a sample entity / record.

  2. In the content type list, you can define permissions by clicking the user icon. In this example, we want the content type to be accessible anonymously. Grant Read permission to the access level SecurityAccessLevel.View (if reading from inside DNN) or SecurityAccessLevel.Anonymous(if you want to access it from outside of DNN)

Read the Data from your Angular App

  1. We will add a component that displays the list of people. Create a folder /src/app/person and add the two files person-list.component.ts and person.component.ts to it; get them from the sample app.

  2. Open app.component.html and add the following code:

    <person-list></person-list>
  3. Open app.module.ts and register the new components. At the top, add the imports:

    import { PersonListComponent } from './person/person-list.component'
    import { PersonComponent } from './person/person.component'

    In the declarations array, add both:

    declarations: [
        AppComponent,
        PersonListComponent,
        PersonComponent
    ],
  4. Reload the page and check if the sample entry is displayed.