s1hofmann
s1hofmann

Reputation: 1551

Angular fullcalendar

I'm currently trying to add a localized version of angular2-fullcalendar into my project. I'm using angular-cli and angular2-fullcalendar, which I installed using npm install --save angular2-fullcalendar.

Now for my question: The calendar component itself is working fine, I'm able to customize it and it shows all my events. The one thing I'm unable to achieve is localization. Following the docs of fullcalendar I'm required to add the locale *.js files, which I did by adding the file to my angular-cli.json file. Unfortunately, this didn't lead to the expected result of an localized calendar.

Has anybody ever worked with fullcalendar in angular and could give me some pointers? I'm relatively new to the angular business, so if I'm approaching things the totally wrong way, please also let me know! :)

Thank you!

Upvotes: 0

Views: 1935

Answers (1)

Harleen Kaur Arora
Harleen Kaur Arora

Reputation: 2087

Open your angular-cli.json file, match file and replace the code :-

{
  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
   "project": {
     "name": "project name"
    },
   "apps": [
   {
    "root": "src",
    "outDir": "dist",
    "assets": [
       "assets",
       "favicon.ico"
      ],
     "index": "index.html",
     "main": "main.ts",
     "polyfills": "polyfills.ts",
      "test": "test.ts",
      "tsconfig": "tsconfig.app.json",
      "testTsconfig": "tsconfig.spec.json",
      "prefix": "app",
      "styles": [
        "styles.css",
        "../node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
        "../node_modules/bootstrap/dist/css/bootstrap.min.css"
       ],
       "scripts": [
         "../node_modules/jquery/dist/jquery.js",
         "../node_modules/bootstrap/dist/js/bootstrap.js"
        ],
        "environmentSource": "environments/environment.ts",
         "environments": {
           "dev": "environments/environment.ts",
            "prod": "environments/environment.prod.ts"
         }
       }
     ],
    "e2e": {
       "protractor": {
        "config": "./protractor.conf.js"
        }
     },
    "lint": [
    {
      "project": "src/tsconfig.app.json"
    },
    {
      "project": "src/tsconfig.spec.json"
    },
    {
      "project": "e2e/tsconfig.e2e.json"
    }
   ],
   "test": {
     "karma": {
      "config": "./karma.conf.js"
      }
     },
    "defaults": {
      "styleExt": "css",
      "component": {}
     }
    }

Upvotes: 0

Related Questions