Giter Site home page Giter Site logo

angular-modules-lab-dc-web-120919's Introduction

Including Submodules

Objectives

  • Define a new Angular app module
  • Invoke Angular with angular.bootstrap
  • Invoke Angular with ng-app
  • Import the ngRoute submodule

Instructions

Fork and clone this directory to get started.

In this lab you'll create a module in Angular named app. Do this in our app.js file.

You'll then need to create our MainController controller. Do this in MainController.js, and attach it to our module named app.

Check index.html and notice how you'll see Hello, {{ name }}!. This means our module isn't rendering - using the ng-app attribute, bootstrap it to the HTML element with the class app. Refresh the page - oh wait, we don't see anything! We need to attach a value to the name property on our $scope (make sure you set $scope as the first argument in the controller!).

Our module has a sub-module dependency for ngRoute (defined in the angular-route.js file in this repo. Add this dependency to the module. We won't see anything different, but if done correctly we won't get any errors! We will actually use the module later on.

angular-modules-lab-dc-web-120919's People

Contributors

ipc103 avatar toddmotto avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

amiadefreitas0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.