August 2017
Beginner
374 pages
10h 41m
English
Next, we will need to define the module and controller in our src/index.js file:
const app = angular.module('blog', [])
This tells Angular to attach (render the app) to the ng-app="blog" container element.
app.controller('posts', ($scope) => {
const { posts } = store.getState()
$scope.posts = posts})
In your browser, you should now see a result similar to the previous render() function:
Read now
Unlock full access