Giter VIP home page Giter VIP logo

learning-angularjs's Introduction

learing-angularjs

###Step by step buiding web/app with AngularJS

Step 1

We will need certain files for our application like bootstrap and of course angular. We will tell bower to grab those components for us.

Bower is a great frontend tool to manager your frontend resources. You just specify the packages you need and it will go grab them for you. Here’s an article on getting started with bower.

First we will need Bower installed on our machine. Just type in npm install -g bower into your console.

After you have done that, you will now have access to bower globally on your system. We will need 2 files to get Bower working for us (.bowerrc and bower.json). We’ll place both of these in the root of our document.

.bowerrc will tell Bower where to place our files. bower.json is similar to package.json and will tell Bower which packages are needed.

{
    "directory" :"libs" 
}

bower.json

{
  "name": "libs for bower",
  "version": "0.1",
  "dependencies": {
    "angular": "~1.2.22",
    "bootstrap": "~3.2.0",
    "font-awesome": "~4.1.0",
    "angular-ui-router": "~0.2.10"
  }
}

Create ReourceService

 return $resource(appConfig.apiHost + '/:api/:table/:id',
            {
                api: 'api',
                table: '@table',
                id: '@id'
            }
            , { 'get': {method: 'GET', params: {}},
                'save': {method: 'POST', params: {}},
                'query': {method: 'GET', isArray: true},
                'remove': {method: 'DELETE', params: {}},
                'delete': {method: 'DELETE', params: {}} })

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.